Add tests for casts that should be eliminated

llvm-svn: 11741
This commit is contained in:
Chris Lattner 2004-02-23 07:16:03 +00:00
parent e79e854c5c
commit be9082a63d
1 changed files with 13 additions and 1 deletions

View File

@ -82,8 +82,20 @@ int* %test12() {
ret int* %c
}
ubyte *%test13(long %A) {
%c = getelementptr [0 x ubyte]* cast ([32832 x ubyte]* %inbuf to [0 x ubyte]*), long 0, long %A
ret ubyte* %c
}
bool %test14(sbyte %A) {
%B = cast sbyte %A to ubyte
%X = setlt ubyte %B, 128 ; setge %A, 0
ret bool %X
}
bool %test15(ubyte %A) {
%B = cast ubyte %A to sbyte
%X = setlt sbyte %B, 0 ; setgt %A, 127
ret bool %X
}