mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-29 23:12:55 +01:00
7f5ef2d7a5
llvm-svn: 32115
30 lines
907 B
LLVM
30 lines
907 B
LLVM
; These tests should not contain a sign extend.
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsh &&
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsb
|
|
|
|
int %test1(uint %mode.0.i.0) {
|
|
%tmp.79 = cast uint %mode.0.i.0 to short
|
|
%tmp.80 = cast short %tmp.79 to int
|
|
%tmp.81 = and int %tmp.80, 24
|
|
ret int %tmp.81
|
|
}
|
|
|
|
short %test2(short %X, short %x) {
|
|
%tmp = cast short %X to int
|
|
%tmp1 = cast short %x to int
|
|
%tmp2 = add int %tmp, %tmp1
|
|
%tmp4 = shr int %tmp2, ubyte 1
|
|
%tmp4 = cast int %tmp4 to short
|
|
%tmp45 = cast short %tmp4 to int
|
|
%retval = cast int %tmp45 to short
|
|
ret short %retval
|
|
}
|
|
|
|
short %test3(uint %X) {
|
|
%tmp1 = shr uint %X, ubyte 16
|
|
%tmp1 = cast uint %tmp1 to short
|
|
ret short %tmp1
|
|
}
|
|
|