mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -47,3 +47,14 @@ ubyte %test8(ubyte %A) { ; AND associates
|
|||||||
ret ubyte %C
|
ret ubyte %C
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool %test9(int %A) {
|
||||||
|
%B = and int %A, -2147483648 ; Test of sign bit, convert to setle %A, 0
|
||||||
|
%C = cast int %B to bool
|
||||||
|
ret bool %C
|
||||||
|
}
|
||||||
|
|
||||||
|
bool %test9(uint %A) {
|
||||||
|
%B = and uint %A, 2147483648 ; Test of sign bit, convert to setle %A, 0
|
||||||
|
%C = cast uint %B to bool
|
||||||
|
ret bool %C
|
||||||
|
}
|
||||||
|
@ -68,19 +68,24 @@ short %test10(short %A) {
|
|||||||
|
|
||||||
bool %test11(ubyte %A, ubyte %B) {
|
bool %test11(ubyte %A, ubyte %B) {
|
||||||
%C = sub ubyte %A, %B
|
%C = sub ubyte %A, %B
|
||||||
%D = cast ubyte %C to bool ; == setne A, B
|
%cD = cast ubyte %C to bool ; == setne A, B
|
||||||
ret bool %D
|
ret bool %cD
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %test12(ubyte %A) {
|
bool %test12(ubyte %A) {
|
||||||
%B = add ubyte %A, 255
|
%B = add ubyte %A, 255
|
||||||
%C = cast ubyte %B to bool ; === A != 1
|
%c = cast ubyte %B to bool ; === A != 1
|
||||||
ret bool %C
|
ret bool %c
|
||||||
}
|
}
|
||||||
|
|
||||||
bool %test13(ubyte %A, ubyte %b) {
|
bool %test13(ubyte %A, ubyte %b) {
|
||||||
%B = add ubyte %A, %b
|
%B = add ubyte %A, %b
|
||||||
%C = cast ubyte %B to bool ; === A != -b
|
%c = cast ubyte %B to bool ; === A != -b
|
||||||
ret bool %C
|
ret bool %c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool %test14(ubyte %A) {
|
||||||
|
%B = xor ubyte %A, 4
|
||||||
|
%c = cast ubyte %B to bool
|
||||||
|
ret bool %c
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user