mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Test cases for when casts to bool can be eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6870 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
031a112747
commit
8186a94e08
@ -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
Block a user