mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 14:46:53 +00:00
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:
parent
e58b25490b
commit
6e54db0852
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user