new testcase we handle right now.
[oota-llvm.git] / test / CodeGen / PowerPC / and_sext.ll
1 ; These tests should not contain a sign extend.
2 ; RUN: llvm-as < %s | llc -march=ppc32 &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh  &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
5
6 int %test1(uint %mode.0.i.0) {
7         %tmp.79 = cast uint %mode.0.i.0 to short
8         %tmp.80 = cast short %tmp.79 to int
9         %tmp.81 = and int %tmp.80, 24
10         ret int %tmp.81
11 }
12
13 short %test2(short %X, short %x) {
14         %tmp = cast short %X to int
15         %tmp1 = cast short %x to int
16         %tmp2 = add int %tmp, %tmp1
17         %tmp4 = shr int %tmp2, ubyte 1
18         %tmp4 = cast int %tmp4 to short
19         %tmp45 = cast short %tmp4 to int
20         %retval = cast int %tmp45 to short
21         ret short %retval
22 }
23