diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-02 07:33:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-02 07:33:59 +0000 |
commit | 12c8d5f5fe24c195b90264931479cc741cd1bb07 (patch) | |
tree | 7c48c8bd9de8f7d21a16817c97278551ad8230e8 /test/Transforms/SCCP | |
parent | 580e791dedf60750b3ceb823ed91f1a8f57952a9 (diff) | |
download | external_llvm-12c8d5f5fe24c195b90264931479cc741cd1bb07.zip external_llvm-12c8d5f5fe24c195b90264931479cc741cd1bb07.tar.gz external_llvm-12c8d5f5fe24c195b90264931479cc741cd1bb07.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SCCP')
-rw-r--r-- | test/Transforms/SCCP/ipsccp-basic.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index d3584d1..4c3c1cf 100644 --- a/test/Transforms/SCCP/ipsccp-basic.ll +++ b/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 + |