summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
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
commitb5e918dc056dc254d689c1deb6a104c59b855f1f (patch)
treefa69ed052f8402b7216df4bbb511c8e258a21ac1 /llvm/test/CodeGen/X86
parent50c63168edfc81e46476d541848084756367ba99 (diff)
downloadbcm5719-llvm-b5e918dc056dc254d689c1deb6a104c59b855f1f.tar.gz
bcm5719-llvm-b5e918dc056dc254d689c1deb6a104c59b855f1f.zip
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. llvm-svn: 108765
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r--llvm/test/CodeGen/X86/fast-isel-atomic.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fast-isel-atomic.ll b/llvm/test/CodeGen/X86/fast-isel-atomic.ll
new file mode 100644
index 00000000000..f8eee9caa6a
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud