mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add a bunch of tests for ANDs that should be eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
05b402ce9f
commit
e768ff2cdc
@ -179,3 +179,16 @@ ubyte %test27(ubyte %A) {
|
||||
%E = add ubyte %D, 16
|
||||
ret ubyte %E
|
||||
}
|
||||
|
||||
int %test28(int %X) { ;; This is juse a zero extending shr.
|
||||
%Y = shr int %X, ubyte 24 ;; Sign extend
|
||||
%Z = and int %Y, 255 ;; Mask out sign bits
|
||||
ret int %Z
|
||||
}
|
||||
|
||||
int %test29(ubyte %X) {
|
||||
%Y = cast ubyte %X to int
|
||||
%Z = and int %Y, 255 ;; Zero extend makes this unneeded.
|
||||
ret int %Z
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user