summaryrefslogtreecommitdiff
path: root/test/Transforms/SCCP
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-03 19:24:51 +0000
committerChris Lattner <sabre@nondot.org>2009-11-03 19:24:51 +0000
commit2396cc37ae6f29693b0984e0d9129487a4e3830c (patch)
tree358a92b9488dd819680f860b00d59114ea868fcb /test/Transforms/SCCP
parent954cb43c8075a66390de9357595ca6069d86941c (diff)
downloadllvm-2396cc37ae6f29693b0984e0d9129487a4e3830c.tar.gz
llvm-2396cc37ae6f29693b0984e0d9129487a4e3830c.tar.bz2
llvm-2396cc37ae6f29693b0984e0d9129487a4e3830c.tar.xz
fix an IPSCCP bug I introduced when I changed IPSCCP to start working on
functions that don't have local linkage. Basically, we need to be more careful about propagating argument information to functions whose results we aren't tracking. This fixes a miscompilation of LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SCCP')
-rw-r--r--test/Transforms/SCCP/ipsccp-basic.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll
index ec349e91d2..2442c56e01 100644
--- a/test/Transforms/SCCP/ipsccp-basic.ll
+++ b/test/Transforms/SCCP/ipsccp-basic.ll
@@ -174,4 +174,24 @@ define i32 @test7b() {
; CHECK-NEXT: ret i32 36
}
+;;======================== test8
+
+
+define internal {} @test8a(i32 %A, i32* %P) {
+ store i32 %A, i32* %P
+ ret {} {}
+; CHECK: @test8a
+; CHECK-NEXT: store i32 5,
+; CHECK-NEXT: ret
+}
+
+define void @test8b(i32* %P) {
+ %X = call {} @test8a(i32 5, i32* %P)
+ ret void
+; CHECK: define void @test8b
+; CHECK-NEXT: call {} @test8a
+; CHECK-NEXT: ret void
+}
+
+