summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShuxin Yang <shuxin.llvm@gmail.com>2013-06-08 04:56:05 +0000
committerShuxin Yang <shuxin.llvm@gmail.com>2013-06-08 04:56:05 +0000
commit9792b646c68d0dcee4049662091f1496b4c85ce7 (patch)
tree3770a7ba7fe041ccb747d7ae33b4870ede6614d7 /test
parentdbfb960e74cc37e7a066f7fbcf78e6936a9e7794 (diff)
downloadllvm-9792b646c68d0dcee4049662091f1496b4c85ce7.tar.gz
llvm-9792b646c68d0dcee4049662091f1496b4c85ce7.tar.bz2
llvm-9792b646c68d0dcee4049662091f1496b4c85ce7.tar.xz
Fix a potential bug in r183584.
r183584 tries to derive some info from the code *AFTER* a call and apply these derived info to the code *BEFORE* the call, which is not always safe as the call in question may never return, and in this case, the derived info is invalid. Thank Duncan for pointing out this potential bug. rdar://14073661 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/MemCpyOpt/memcpy.ll22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/Transforms/MemCpyOpt/memcpy.ll b/test/Transforms/MemCpyOpt/memcpy.ll
index fa768712ec..148623a6ce 100644
--- a/test/Transforms/MemCpyOpt/memcpy.ll
+++ b/test/Transforms/MemCpyOpt/memcpy.ll
@@ -185,28 +185,6 @@ define void @test10(%opaque* noalias nocapture sret %x, i32 %y) {
ret void
}
-; Test11 is similar to test10 except that the instruction "store i32 %y, i32* %a"
-; before the call-site is deleted. MemCopyOpt is able to optimize this snippet into
-;
-; %x1 = bitcast %opaque* %x to i32*
-; call void @foo(i32* noalias nocapture %x1)
-; ret void
-;
-
-define void @test11(%opaque* noalias nocapture sret %x, i32 %y) {
-; CHECK: test11
-; CHECK: %x1 = bitcast %opaque* %x to i32*
-; CHECK: call void @foo(i32* noalias nocapture %x1)
-; CHECK: ret void
-
- %a = alloca i32, align 4
- call void @foo(i32* noalias nocapture %a)
- %c = load i32* %a
- %d = bitcast %opaque* %x to i32*
- store i32 %c, i32* %d
- ret void
-}
-
declare void @f1(%struct.big* sret)
declare void @f2(%struct.big*)