mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
New testcases for signed shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5073336cd4
commit
709ad40dc8
@ -63,9 +63,20 @@ ubyte %test10(ubyte %A) { ;; (A >> 7) << 7 === A & 128
|
||||
ret ubyte %C
|
||||
}
|
||||
|
||||
ubyte %test11(ubyte %A) { ;; (A >> 3) << 4 == (A & 0x1F) << 1
|
||||
ubyte %test11(ubyte %A) { ;; (A >> 3) << 4 === (A & 0x1F) << 1
|
||||
%B = shr ubyte %A, ubyte 3
|
||||
%C = shl ubyte %B, ubyte 4
|
||||
ret ubyte %C
|
||||
}
|
||||
|
||||
int %test12(int %A) {
|
||||
%B = shr int %A, ubyte 8 ;; (A >> 8) << 8 === A & -256
|
||||
%C = shl int %B, ubyte 8
|
||||
ret int %C
|
||||
}
|
||||
|
||||
sbyte %test13(sbyte %A) { ;; (A >> 3) << 4 === (A & -8) * 2
|
||||
%B = shr sbyte %A, ubyte 3
|
||||
%C = shl sbyte %B, ubyte 4
|
||||
ret sbyte %C
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user