New testcasses for divides that can be eliminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-09-29 17:37:07 +00:00
parent 9ed920437a
commit a2393502be

View File

@ -30,3 +30,28 @@ uint %test5(uint %A) {
%C = div uint %B, 4294967292
ret uint %C
}
bool %test6(uint %A) {
%B = div uint %A, 123
%C = seteq uint %B, 0 ; A < 123
ret bool %C
}
bool %test7(uint %A) {
%B = div uint %A, 10
%C = seteq uint %B, 2 ; A >= 20 && A < 30
ret bool %C
}
bool %test8(ubyte %A) {
%B = div ubyte %A, 123
%C = seteq ubyte %B, 2 ; A >= 246
ret bool %C
}
bool %test9(ubyte %A) {
%B = div ubyte %A, 123
%C = setne ubyte %B, 2 ; A < 246
ret bool %C
}