new testcases

llvm-svn: 12352
This commit is contained in:
Chris Lattner 2004-03-12 23:52:51 +00:00
parent f9e69b4553
commit b4e933ba14
1 changed files with 13 additions and 1 deletions

View File

@ -1,7 +1,7 @@
; This test makes sure that these instructions are properly eliminated. ; This test makes sure that these instructions are properly eliminated.
; ;
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep sub | not grep -v 'sub int %Cok, %Bok' ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v 'sub int %Cok, %Bok' | not grep sub
implementation implementation
@ -74,3 +74,15 @@ bool %test11(ubyte %A, ubyte %B) {
%cD = setne ubyte %C, 0 ; == setne A, B %cD = setne ubyte %C, 0 ; == setne A, B
ret bool %cD ret bool %cD
} }
int %test12(int %A) {
%B = shr int %A, ubyte 31
%C = sub int 0, %B ; == ushr A, 31
ret int %C
}
uint %test13(uint %A) {
%B = shr uint %A, ubyte 31
%C = sub uint 0, %B ; == sar A, 31
ret uint %C
}