For PR1319: Upgrade to use new test harness
[oota-llvm.git] / test / CodeGen / ARM / sxt_rot.ll
1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
2 ; RUN:   grep sxtb  | wc -l | grep 1
3 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
4 ; RUN:   grep sxtab | wc -l | grep 1
5
6 define i8 @test1(i32 %A) sext {
7         %B = lshr i32 %A, 8
8         %C = shl i32 %A, 24
9         %D = or i32 %B, %C
10         %E = trunc i32 %D to i8
11         ret i8 %E
12 }
13
14 define i32 @test2(i32 %A, i32 %X) sext {
15         %B = lshr i32 %A, 8
16         %C = shl i32 %A, 24
17         %D = or i32 %B, %C
18         %E = trunc i32 %D to i8
19         %F = sext i8 %E to i32
20         %G = add i32 %F, %X
21         ret i32 %G
22 }