summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/atomic_op.ll
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-13 22:47:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-13 22:47:00 +0000
commit42fc29e7176ff51d649eccf82c836510fde4438f (patch)
treee2d75b68bf9dd9baa14352328a6b62506d4ae596 /test/CodeGen/X86/atomic_op.ll
parent3423132f2e48ba34fa76df0d8ab8990c85b5e677 (diff)
downloadllvm-42fc29e7176ff51d649eccf82c836510fde4438f.tar.gz
llvm-42fc29e7176ff51d649eccf82c836510fde4438f.tar.bz2
llvm-42fc29e7176ff51d649eccf82c836510fde4438f.tar.xz
Fix X86 codegen for 'atomicrmw nand' to generate *x = ~(*x & y), not *x = ~*x & y.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/atomic_op.ll')
-rw-r--r--test/CodeGen/X86/atomic_op.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/atomic_op.ll b/test/CodeGen/X86/atomic_op.ll
index 972dab292a..c8cb78e34e 100644
--- a/test/CodeGen/X86/atomic_op.ll
+++ b/test/CodeGen/X86/atomic_op.ll
@@ -13,6 +13,7 @@ entry:
%xort = alloca i32 ; <i32*> [#uses=2]
%old = alloca i32 ; <i32*> [#uses=18]
%temp = alloca i32 ; <i32*> [#uses=2]
+ %temp64 = alloca i64
store i32 %argc, i32* %argc.addr
store i8** %argv, i8*** %argv.addr
store i32 0, i32* %val1
@@ -106,6 +107,20 @@ entry:
; CHECK: cmpxchgl
%17 = cmpxchg i32* %val2, i32 1976, i32 1 monotonic
store i32 %17, i32* %old
+ ; CHECK: andl
+ ; CHECK: notl
+ ; CHECK: lock
+ ; CHECK: cmpxchgl
+ %18 = atomicrmw nand i32* %val2, i32 1401 monotonic
+ store i32 %18, i32* %old
+ ; CHECK: andl
+ ; CHECK: andl
+ ; CHECK: notl
+ ; CHECK: notl
+ ; CHECK: lock
+ ; CHECK: cmpxchg8b
+ %19 = atomicrmw nand i64* %temp64, i64 17361641481138401520 monotonic
+ store i64 %19, i64* %temp64
ret void
}