forked from OSchip/llvm-project
Test cases for when casts to bool can be eliminated
llvm-svn: 6870
This commit is contained in:
parent
04bdfe624c
commit
4bc0c4b974
|
@ -68,3 +68,16 @@ short %test10(short %A) {
|
|||
%c2 = cast uint %c1 to short
|
||||
ret short %c2
|
||||
}
|
||||
|
||||
bool %test11(ubyte %A, ubyte %B) {
|
||||
%C = sub ubyte %A, %B
|
||||
%D = cast ubyte %C to bool ; == setne A, B
|
||||
ret bool %D
|
||||
}
|
||||
|
||||
bool %test12(ubyte %A) {
|
||||
%B = add ubyte %A, 255
|
||||
%C = cast ubyte %B to bool ; === A != 1
|
||||
ret bool %C
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue