New testcase: the phi can be eliminated if the casts are sucked into it.

Note that this reduces code size anyway (as well as making further
optimizations simpler) so it's always a win.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-11-14 19:12:17 +00:00
parent e58b25490b
commit 6e54db0852

View File

@ -53,3 +53,15 @@ Exit:
ret int %B
}
uint %test6(int %A, bool %b) {
BB0:
%X = cast int %A to uint
br bool %b, label %BB1, label %BB2
BB1:
%Y = cast int %A to uint
br label %BB2
BB2:
%B = phi uint [%X, %BB0], [%Y, %BB1] ;; Suck casts into phi
ret uint %B
}