Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -march=arm -mattr=+v6 | \
      2 ; RUN:   grep sxtb | count 2
      3 ; RUN: llc < %s -march=arm -mattr=+v6 | \
      4 ; RUN:   grep sxtb | grep ror | count 1
      5 ; RUN: llc < %s -march=arm -mattr=+v6 | \
      6 ; RUN:   grep sxtab | count 1
      7 
      8 define i32 @test0(i8 %A) {
      9         %B = sext i8 %A to i32
     10 	ret i32 %B
     11 }
     12 
     13 define signext i8 @test1(i32 %A) {
     14 	%B = lshr i32 %A, 8
     15 	%C = shl i32 %A, 24
     16 	%D = or i32 %B, %C
     17 	%E = trunc i32 %D to i8
     18 	ret i8 %E
     19 }
     20 
     21 define signext i32 @test2(i32 %A, i32 %X) {
     22 	%B = lshr i32 %A, 8
     23 	%C = shl i32 %A, 24
     24 	%D = or i32 %B, %C
     25 	%E = trunc i32 %D to i8
     26         %F = sext i8 %E to i32
     27         %G = add i32 %F, %X
     28 	ret i32 %G
     29 }
     30