1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

New testcases for signed shifts

llvm-svn: 7294
This commit is contained in:
Chris Lattner 2003-07-24 18:38:09 +00:00
parent e98a7e97d9
commit ffcad975f1

View File

@ -63,9 +63,20 @@ ubyte %test10(ubyte %A) { ;; (A >> 7) << 7 === A & 128
ret ubyte %C
}
ubyte %test11(ubyte %A) { ;; (A >> 3) << 4 == (A & 0x1F) << 1
ubyte %test11(ubyte %A) { ;; (A >> 3) << 4 === (A & 0x1F) << 1
%B = shr ubyte %A, ubyte 3
%C = shl ubyte %B, ubyte 4
ret ubyte %C
}
int %test12(int %A) {
%B = shr int %A, ubyte 8 ;; (A >> 8) << 8 === A & -256
%C = shl int %B, ubyte 8
ret int %C
}
sbyte %test13(sbyte %A) { ;; (A >> 3) << 4 === (A & -8) * 2
%B = shr sbyte %A, ubyte 3
%C = shl sbyte %B, ubyte 4
ret sbyte %C
}