[PATCH] D59308: [X86] Check for 64-bit mode in X86Subtarget::hasCmpxchg16b()

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 10:22:12 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: jfb, RKSimon, spatel.
Herald added subscribers: jdoerfert, JDevlieghere.

The feature flag alone can't be trusted since it can be passed via -mattr. Need to ensure 64-bit mode as well.

We had a 64 bit mode check on the instruction to make the assembler work correctly. But we weren't guarding any of our lowering code or the hooks for the AtomicExpandPass.

I've added 32-bit command lines to atomic128.ll with and without cx16. The tests there would all previously fail if -mattr=cx16 was passed to them. I had to move one test case for f128 to a new file as it seems to have a different 32-bit mode or possibly sse issue.


https://reviews.llvm.org/D59308

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrInfo.td
  lib/Target/X86/X86Subtarget.h
  test/CodeGen/X86/atomic128.ll
  test/CodeGen/X86/atomicf128.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59308.190444.patch
Type: text/x-patch
Size: 29331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190313/11ae0ad9/attachment.bin>


More information about the llvm-commits mailing list