summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-11-29 21:40:55 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-11-29 21:40:55 +0000
commitfac554a1317bf32daf5698740670025ae14e6bcc (patch)
treeace4cef5a84f4a0a11f19dee5314a65156ed6c89 /test/Transforms
parente6f329476c6598db1b45c3d573eac9cf65179831 (diff)
downloadllvm-fac554a1317bf32daf5698740670025ae14e6bcc.tar.gz
llvm-fac554a1317bf32daf5698740670025ae14e6bcc.tar.bz2
llvm-fac554a1317bf32daf5698740670025ae14e6bcc.tar.xz
Teach ConstantFolding to do a better job when folding gep(bitcast).
This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/getelementptr.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll
index 285e0ba602..de325f6402 100644
--- a/test/Transforms/InstCombine/getelementptr.ll
+++ b/test/Transforms/InstCombine/getelementptr.ll
@@ -445,7 +445,7 @@ define i32 @test35() nounwind {
i8* getelementptr (%t1* bitcast (%t0* @s to %t1*), i32 0, i32 1, i32 0)) nounwind
ret i32 0
; CHECK: @test35
-; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* bitcast (i8** getelementptr (%t1* bitcast (%t0* @s to %t1*), i64 1, i32 0) to i8*)) nounwind
+; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* getelementptr inbounds (%t0* @s, i64 0, i32 1, i64 0)) nounwind
}
; Instcombine should constant-fold the GEP so that indices that have