mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c2328e5a9
commit
9961cf1fed
22
test/Transforms/InstCombine/shift-simplify.ll
Normal file
22
test/Transforms/InstCombine/shift-simplify.ll
Normal file
@ -0,0 +1,22 @@
|
||||
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | egrep 'shl|lshr|ashr' | wc -l | grep 3
|
||||
|
||||
int %test0(int %A, int %B, ubyte %C) {
|
||||
%X = shl int %A, ubyte %C
|
||||
%Y = shl int %B, ubyte %C
|
||||
%Z = and int %X, %Y
|
||||
ret int %Z
|
||||
}
|
||||
|
||||
int %test1(int %A, int %B, ubyte %C) {
|
||||
%X = lshr int %A, ubyte %C
|
||||
%Y = lshr int %B, ubyte %C
|
||||
%Z = or int %X, %Y
|
||||
ret int %Z
|
||||
}
|
||||
|
||||
int %test2(int %A, int %B, ubyte %C) {
|
||||
%X = ashr int %A, ubyte %C
|
||||
%Y = ashr int %B, ubyte %C
|
||||
%Z = xor int %X, %Y
|
||||
ret int %Z
|
||||
}
|
Loading…
Reference in New Issue
Block a user