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
This commit is contained in:
Eli Friedman
2011-09-20 23:28:51 +00:00
parent e97190fdf8
commit 79782fc864
2 changed files with 53 additions and 9 deletions
+18
View File
@@ -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
}