mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
* Add testcases for associative operators
* Add testcase for or ubyte, 255 which was broken before git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1680312867
commit
1b77300154
@ -43,3 +43,9 @@ int %test7(int %A) { ; A & ~A == 0
|
|||||||
%B = and int %A, %NotA
|
%B = and int %A, %NotA
|
||||||
ret int %B
|
ret int %B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ubyte %test8(ubyte %A) { ; AND associates
|
||||||
|
%B = and ubyte %A, 3
|
||||||
|
%C = and ubyte %B, 4
|
||||||
|
ret ubyte %C
|
||||||
|
}
|
||||||
|
@ -32,3 +32,9 @@ int %test5(int %A) {
|
|||||||
%B = mul int %A, 8
|
%B = mul int %A, 8
|
||||||
ret int %B
|
ret int %B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int %test6(ubyte %A) {
|
||||||
|
%B = mul ubyte %A, 8
|
||||||
|
%C = mul ubyte %B, 13
|
||||||
|
ret ubyte %C
|
||||||
|
}
|
||||||
|
@ -18,6 +18,11 @@ int %test2(int %A) {
|
|||||||
ret int %B
|
ret int %B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ubyte %test2a(ubyte %A) {
|
||||||
|
%B = or ubyte %A, 255
|
||||||
|
ret ubyte %B
|
||||||
|
}
|
||||||
|
|
||||||
bool %test3(bool %A) {
|
bool %test3(bool %A) {
|
||||||
%B = or bool %A, false
|
%B = or bool %A, false
|
||||||
ret bool %B
|
ret bool %B
|
||||||
@ -75,3 +80,14 @@ uint %test13(uint %A) { ; (A|B)^B == A & (~B)
|
|||||||
%r = xor uint %t1, 123
|
%r = xor uint %t1, 123
|
||||||
ret uint %r
|
ret uint %r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ubyte %test14(ubyte %A) {
|
||||||
|
%B = or ubyte %A, 254
|
||||||
|
%C = or ubyte %B, 1
|
||||||
|
ret ubyte %C
|
||||||
|
}
|
||||||
|
ubyte %test15(ubyte %A) {
|
||||||
|
%B = xor ubyte %A, 17
|
||||||
|
%C = xor ubyte %B, 17
|
||||||
|
ret ubyte %C
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user