mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add tests for casts that should be eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11741 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4cb170cc6e
commit
3c4de7fbe0
@ -82,8 +82,20 @@ int* %test12() {
|
||||
ret int* %c
|
||||
}
|
||||
|
||||
|
||||
ubyte *%test13(long %A) {
|
||||
%c = getelementptr [0 x ubyte]* cast ([32832 x ubyte]* %inbuf to [0 x ubyte]*), long 0, long %A
|
||||
ret ubyte* %c
|
||||
}
|
||||
|
||||
bool %test14(sbyte %A) {
|
||||
%B = cast sbyte %A to ubyte
|
||||
%X = setlt ubyte %B, 128 ; setge %A, 0
|
||||
ret bool %X
|
||||
}
|
||||
|
||||
bool %test15(ubyte %A) {
|
||||
%B = cast ubyte %A to sbyte
|
||||
%X = setlt sbyte %B, 0 ; setgt %A, 127
|
||||
ret bool %X
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user