[PATCH] D42154: Don't generate inline atomics for i386/i486
Wei Mi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 17:40:21 PST 2018
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, i386 doesn't support any cmpxchg related instructions. i486 only supports cmpxchg. So in this patch MaxAtomicInlineWidth is reset as follows.
For i486, the MaxAtomicInlineWidth should be 32 because it supports cmpxchg.
For i386, the MaxAtomicInlineWidth should be 0.
For others x86-32 cpu, the MaxAtomicInlineWidth should be 64 because of cmpxchg8b.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4231 bytes
Desc: not available
More information about the cfe-commits