summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SCCP/ipsccp-basic.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-02 07:33:59 +0000
committerChris Lattner <sabre@nondot.org>2009-11-02 07:33:59 +0000
commit9d49f0c8588e0729e4ca255b6ed15e85b5850106 (patch)
treefb893e32e62599df7c082a9e53c43b6084a92611 /llvm/test/Transforms/SCCP/ipsccp-basic.ll
parentfb2d3852216e2fc323708933ab011fcf1c9e5296 (diff)
downloadbcm5719-llvm-9d49f0c8588e0729e4ca255b6ed15e85b5850106.tar.gz
bcm5719-llvm-9d49f0c8588e0729e4ca255b6ed15e85b5850106.zip
improve IPSCCP to be able to propagate the result of "!mayBeOverridden"
function to calls of that function, regardless of whether it has local linkage or has its address taken. Not escaping should only affect whether we make an aggressive assumption about the arguments to a function, not whether we can track the result of it. llvm-svn: 85795
Diffstat (limited to 'llvm/test/Transforms/SCCP/ipsccp-basic.ll')
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-basic.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SCCP/ipsccp-basic.ll b/llvm/test/Transforms/SCCP/ipsccp-basic.ll
index d3584d1b3ce..4c3c1cf054c 100644
--- a/llvm/test/Transforms/SCCP/ipsccp-basic.ll
+++ b/llvm/test/Transforms/SCCP/ipsccp-basic.ll
@@ -134,3 +134,17 @@ define internal i64 @test5c({i64,i64} %a) {
ret i64 %b
}
+
+;;======================== test6
+
+define i64 @test6a() {
+ ret i64 0
+}
+
+define i64 @test6b() {
+ %a = call i64 @test6a()
+ ret i64 %a
+}
+; CHECK: define i64 @test6b
+; CHECK: ret i64 0
+
OpenPOWER on IntegriCloud