summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/fast-isel-atomic.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-19 22:48:56 +0000
committerDan Gohman <gohman@apple.com>2010-07-19 22:48:56 +0000
commitc6e59b71f50c7c77bc448a936dba8e84d90911e8 (patch)
tree91d6867c5e9b1bc36fc3911e50843adad38a63ea /test/CodeGen/X86/fast-isel-atomic.ll
parentd70f57b254114841892425a40944268d38ae0bcd (diff)
downloadllvm-c6e59b71f50c7c77bc448a936dba8e84d90911e8.tar.gz
llvm-c6e59b71f50c7c77bc448a936dba8e84d90911e8.tar.bz2
llvm-c6e59b71f50c7c77bc448a936dba8e84d90911e8.tar.xz
After a custom inserter, in a block which has constant instructions,
update the current basic block in addition to the current insert position, so that they remain consistent. This fixes rdar://8204072. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/fast-isel-atomic.ll')
-rw-r--r--test/CodeGen/X86/fast-isel-atomic.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fast-isel-atomic.ll b/test/CodeGen/X86/fast-isel-atomic.ll
new file mode 100644
index 0000000000..f8eee9caa6
--- /dev/null
+++ b/test/CodeGen/X86/fast-isel-atomic.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -O0 -march=x86-64
+; rdar://8204072
+
+@sc = external global i8
+@uc = external global i8
+
+declare i8 @llvm.atomic.load.and.i8.p0i8(i8* nocapture, i8) nounwind
+
+define void @test_fetch_and_op() nounwind {
+entry:
+ %tmp40 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @sc, i8 11) ; <i8> [#uses=1]
+ store i8 %tmp40, i8* @sc
+ %tmp41 = call i8 @llvm.atomic.load.and.i8.p0i8(i8* @uc, i8 11) ; <i8> [#uses=1]
+ store i8 %tmp41, i8* @uc
+ ret void
+}