summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/lock-inst-encoding.ll
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-09-26 23:15:09 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-09-26 23:15:09 +0000
commit184944acdfb74041a2362af904e6eda3f0d3f645 (patch)
treea2f0267fc88d1f9038f8c1c9370862e878b8cda4 /test/CodeGen/X86/lock-inst-encoding.ll
parent2dafe200ca2708ec08656e51a52ce4d718e8a1d6 (diff)
Convert a bunch more tests over to the new atomic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140582 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/lock-inst-encoding.ll')
-rw-r--r--test/CodeGen/X86/lock-inst-encoding.ll20
1 files changed, 5 insertions, 15 deletions
diff --git a/test/CodeGen/X86/lock-inst-encoding.ll b/test/CodeGen/X86/lock-inst-encoding.ll
index 6e93cf998b8..9765faeecad 100644
--- a/test/CodeGen/X86/lock-inst-encoding.ll
+++ b/test/CodeGen/X86/lock-inst-encoding.ll
@@ -7,48 +7,38 @@ target triple = "x86_64-apple-darwin10.0.0"
; CHECK: addq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,0x48,0x01,0x37]
; CHECK: ret
define void @f1(i64* %a, i64 %b) nounwind {
- call i64 @llvm.atomic.load.add.i64.p0i64(i64* %a, i64 %b) nounwind
+ %1 = atomicrmw add i64* %a, i64 %b monotonic
ret void
}
-declare i64 @llvm.atomic.load.add.i64.p0i64(i64* nocapture, i64) nounwind
-
; CHECK: f2:
; CHECK: subq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,0x48,0x29,0x37]
; CHECK: ret
define void @f2(i64* %a, i64 %b) nounwind {
- call i64 @llvm.atomic.load.sub.i64.p0i64(i64* %a, i64 %b) nounwind
+ %1 = atomicrmw sub i64* %a, i64 %b monotonic
ret void
}
-declare i64 @llvm.atomic.load.sub.i64.p0i64(i64* nocapture, i64) nounwind
-
; CHECK: f3:
; CHECK: andq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,0x48,0x21,0x37]
; CHECK: ret
define void @f3(i64* %a, i64 %b) nounwind {
- call i64 @llvm.atomic.load.and.i64.p0i64(i64* %a, i64 %b) nounwind
+ %1 = atomicrmw and i64* %a, i64 %b monotonic
ret void
}
-declare i64 @llvm.atomic.load.and.i64.p0i64(i64* nocapture, i64) nounwind
-
; CHECK: f4:
; CHECK: orq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,0x48,0x09,0x37]
; CHECK: ret
define void @f4(i64* %a, i64 %b) nounwind {
- call i64 @llvm.atomic.load.or.i64.p0i64(i64* %a, i64 %b) nounwind
+ %1 = atomicrmw or i64* %a, i64 %b monotonic
ret void
}
-declare i64 @llvm.atomic.load.or.i64.p0i64(i64* nocapture, i64) nounwind
-
; CHECK: f5:
; CHECK: xorq %{{.*}}, ({{.*}}){{.*}}encoding: [0xf0,0x48,0x31,0x37]
; CHECK: ret
define void @f5(i64* %a, i64 %b) nounwind {
- call i64 @llvm.atomic.load.xor.i64.p0i64(i64* %a, i64 %b) nounwind
+ %1 = atomicrmw xor i64* %a, i64 %b monotonic
ret void
}
-
-declare i64 @llvm.atomic.load.xor.i64.p0i64(i64* nocapture, i64) nounwind