[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-23 Thread Wei Mi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323281: Adjust MaxAtomicInlineWidth for i386/i486 targets. (authored by wmi, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42154?vs=130076&i

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-22 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Well, my point is that the example in the linked bug is asking for 486 code-generation, which is apparently unsupported by LLVM. Anyway, it's not a good reason to hold up this patch, since

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-22 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. In https://reviews.llvm.org/D42154#983840, @rjmccall wrote: > In https://reviews.llvm.org/D42154#977991, @wmi wrote: > > > In https://reviews.llvm.org/D42154#977975, @efriedma wrote: > > > > > The LLVM backend currently assumes every CPU is Pentium-compatible. If > > > we'r

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D42154#977991, @wmi wrote: > In https://reviews.llvm.org/D42154#977975, @efriedma wrote: > > > The LLVM backend currently assumes every CPU is Pentium-compatible. If > > we're going to change that in clang, we should probably fix the backend

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Basic/Targets/X86.h:472 +CPUKind Kind = getCPUKind(Opts.CPU); +if (Kind >= CK_i586 || Kind == CK_Generic) + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; wmi wrote: > wmi wrote: > > craig.toppe

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Wei Mi via Phabricator via cfe-commits
wmi added inline comments. Comment at: lib/Basic/Targets/X86.h:472 +CPUKind Kind = getCPUKind(Opts.CPU); +if (Kind >= CK_i586 || Kind == CK_Generic) + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; wmi wrote: > craig.topper wrote: > > craig.toppe

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. In https://reviews.llvm.org/D42154#977975, @efriedma wrote: > The LLVM backend currently assumes every CPU is Pentium-compatible. If we're > going to change that in clang, we should probably fix the backend as well. With the patch, for i386/i486 targets, clang will genera

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Basic/Targets/X86.h:472 +CPUKind Kind = getCPUKind(Opts.CPU); +if (Kind >= CK_i586 || Kind == CK_Generic) + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; craig.topper wrote: > efriedma wrote: >

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Basic/Targets/X86.h:472 +CPUKind Kind = getCPUKind(Opts.CPU); +if (Kind >= CK_i586 || Kind == CK_Generic) + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; efriedma wrote: > What exactly does "CK

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The LLVM backend currently assumes every CPU is Pentium-compatible. If we're going to change that in clang, we should probably fix the backend as well. Comment at: lib/Basic/Targets/X86.h:472 +CPUKind Kind = getCPUKind(Opts.CPU); +if (Kind >=

[PATCH] D42154: Don't generate inline atomics for i386/i486

2018-01-16 Thread Wei Mi via Phabricator via cfe-commits
wmi created this revision. wmi added reviewers: rjmccall, eli.friedman, rsmith. Herald added subscribers: cfe-commits, eraman, sanjoy. This is to fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=34347#c6 Currently, all MaxAtomicInlineWidth of x86-32 targets are set to 64. However,