diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-20 23:28:51 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-20 23:28:51 +0000 |
commit | 79782fc8649e081b59fe2f96265042eaec1542a7 (patch) | |
tree | c02f594c33d6dd57ee8382490e31e7eaa2bc7c44 /test/Transforms/SCCP | |
parent | e97190fdf875843e8161a942f2046fd3ef81330f (diff) | |
download | llvm-79782fc8649e081b59fe2f96265042eaec1542a7.tar.gz llvm-79782fc8649e081b59fe2f96265042eaec1542a7.tar.bz2 llvm-79782fc8649e081b59fe2f96265042eaec1542a7.tar.xz |
Make sure IPSCCP never marks a tracked call as overdefined in SCCPSolver::ResolvedUndefsIn. If we do, we can end up in a situation where a function is resolved to return a constant, but the caller is marked overdefined, which confuses the code later.
<rdar://problem/9956541> (again).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SCCP')
-rw-r--r-- | test/Transforms/SCCP/ipsccp-basic.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index 6ccfd98234..8340f0c1e1 100644 --- a/test/Transforms/SCCP/ipsccp-basic.ll +++ b/test/Transforms/SCCP/ipsccp-basic.ll @@ -209,3 +209,21 @@ entry: } declare i32 @__gxx_personality_v0(...) + +;;======================== test10 + +define i32 @test10a() nounwind { +entry: + %call = call i32 @test10b(i32 undef) + ret i32 %call +; CHECK: define i32 @test10a +; CHECK: ret i32 0 +} + +define internal i32 @test10b(i32 %x) nounwind { +entry: + %r = and i32 %x, 1 + ret i32 %r +; CHECK: define internal i32 @test10b +; CHECK: ret i32 undef +} |