[PATCH] D59576: [X86] Add CMPXCHG8B feature flag. Set it for all CPUs except i386/i486 including 'generic'. Disable use of CMPXCHG8B when this flag isn't set.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 23:06:30 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: jfb, efriedma, jyknight.
Herald added subscribers: jdoerfert, kristina.
Herald added a project: LLVM.

CMPXCHG8B was introduced on i586/pentium generation.

If its not enabled, limit the atomic width to 32 bits so the AtomicExpandPass will expand to lib calls. Unclear if we should be using a different limit for other configs. The default is 1024 and experimentation shows that using an i256 atomic will cause a crash in SelectionDAG.


Repository:
  rL LLVM

https://reviews.llvm.org/D59576

Files:
  lib/Support/Host.cpp
  lib/Target/X86/X86.td
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrCompiler.td
  lib/Target/X86/X86InstrInfo.td
  lib/Target/X86/X86Subtarget.h
  test/CodeGen/X86/atomic64.ll
  test/CodeGen/X86/cmpxchg8b.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59576.191435.patch
Type: text/x-patch
Size: 46595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/badfa3e9/attachment.bin>


More information about the llvm-commits mailing list