Add a bunch of tests for ANDs that should be eliminated.

llvm-svn: 19216
This commit is contained in:
Chris Lattner 2005-01-01 16:13:19 +00:00
parent ea4c66a083
commit 329d0255ae
1 changed files with 13 additions and 0 deletions

View File

@ -179,3 +179,16 @@ ubyte %test27(ubyte %A) {
%E = add ubyte %D, 16
ret ubyte %E
}
int %test28(int %X) { ;; This is juse a zero extending shr.
%Y = shr int %X, ubyte 24 ;; Sign extend
%Z = and int %Y, 255 ;; Mask out sign bits
ret int %Z
}
int %test29(ubyte %X) {
%Y = cast ubyte %X to int
%Z = and int %Y, 255 ;; Zero extend makes this unneeded.
ret int %Z
}