mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
new testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12352 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a82ba0510
commit
99780ce874
@ -1,7 +1,7 @@
|
||||
; 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
|
||||
|
||||
@ -74,3 +74,15 @@ bool %test11(ubyte %A, ubyte %B) {
|
||||
%cD = setne ubyte %C, 0 ; == setne A, B
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user