aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/atomic-cmp.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-02-07 18:50:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-02-07 18:50:47 +0000
commitaa26102db47ac7041a54728cf856de4dca700880 (patch)
tree66beba1fe59cf006ec5e7c1846425aaad9e646ad /test/CodeGen/ARM/atomic-cmp.ll
parent8c8d95d0c20a233d0594d2cde4586326c074bc17 (diff)
Fix an obvious typo which caused an isel assertion. rdar://8964854.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/atomic-cmp.ll')
-rw-r--r--test/CodeGen/ARM/atomic-cmp.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/atomic-cmp.ll b/test/CodeGen/ARM/atomic-cmp.ll
new file mode 100644
index 0000000000..f31aa7bc58
--- /dev/null
+++ b/test/CodeGen/ARM/atomic-cmp.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s -check-prefix=ARM
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s -check-prefix=T2
+; rdar://8964854
+
+define i8 @t(i8* %a, i8 %b, i8 %c) nounwind {
+; ARM: t:
+; ARM: ldrexb
+; ARM: strexb
+
+; T2: t:
+; T2: ldrexb
+; T2: strexb
+ %tmp0 = tail call i8 @llvm.atomic.cmp.swap.i8.p0i8(i8* %a, i8 %b, i8 %c)
+ ret i8 %tmp0
+}
+
+declare i8 @llvm.atomic.cmp.swap.i8.p0i8(i8* nocapture, i8, i8) nounwind