diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-26 21:21:21 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-26 21:21:21 +0000 |
commit | 43f51aeca8367ea35adad963c00bd2bc5b8d1391 (patch) | |
tree | cb558e0aaacbddf5f406784aafe4ff13f10b5deb /test/CodeGen/X86 | |
parent | 51fb91c04c920703fbd4a67ac3f85c0971b2c5a5 (diff) | |
download | external_llvm-43f51aeca8367ea35adad963c00bd2bc5b8d1391.zip external_llvm-43f51aeca8367ea35adad963c00bd2bc5b8d1391.tar.gz external_llvm-43f51aeca8367ea35adad963c00bd2bc5b8d1391.tar.bz2 |
Add support for generating CMPXCHG16B on x86-64 for the cmpxchg IR instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/cmpxchg16b.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmpxchg16b.ll b/test/CodeGen/X86/cmpxchg16b.ll new file mode 100644 index 0000000..ba1c4ef --- /dev/null +++ b/test/CodeGen/X86/cmpxchg16b.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=x86-64 -mcpu=core2 | FileCheck %s + +; Basic 128-bit cmpxchg +define void @t1(i128* nocapture %p) nounwind ssp { +entry: +; CHECK movl $1, %ebx +; CHECK: lock +; CHECK-NEXT: cmpxchg16b + %r = cmpxchg i128* %p, i128 0, i128 1 seq_cst + ret void +} + +; FIXME: Handle 128-bit atomicrmw/load atomic/store atomic |