Reapply r155682, making constant folding more consistent, with a fix to work

properly with how the code handles all-undef PHI nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2012-04-27 17:50:22 +00:00
parent 04a09a461b
commit 03e091f0b5
5 changed files with 90 additions and 38 deletions

View File

@@ -620,3 +620,13 @@ end:
; CHECK-NOT: phi i32
; CHECK: ret i1 %z
}
; CHECK: @test27(
; CHECK: ret i32 undef
define i32 @test27(i1 %b) {
entry:
br label %done
done:
%y = phi i32 [ undef, %entry ]
ret i32 %y
}