* 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:
Chris Lattner 2003-03-10 22:43:56 +00:00
parent 1680312867
commit 1b77300154
3 changed files with 29 additions and 1 deletions

View File

@ -42,4 +42,10 @@ int %test7(int %A) { ; A & ~A == 0
%NotA = xor int %A, -1
%B = and int %A, %NotA
ret int %B
}
}
ubyte %test8(ubyte %A) { ; AND associates
%B = and ubyte %A, 3
%C = and ubyte %B, 4
ret ubyte %C
}

View File

@ -32,3 +32,9 @@ int %test5(int %A) {
%B = mul int %A, 8
ret int %B
}
int %test6(ubyte %A) {
%B = mul ubyte %A, 8
%C = mul ubyte %B, 13
ret ubyte %C
}

View File

@ -18,6 +18,11 @@ int %test2(int %A) {
ret int %B
}
ubyte %test2a(ubyte %A) {
%B = or ubyte %A, 255
ret ubyte %B
}
bool %test3(bool %A) {
%B = or bool %A, false
ret bool %B
@ -75,3 +80,14 @@ uint %test13(uint %A) { ; (A|B)^B == A & (~B)
%r = xor uint %t1, 123
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
}