Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
      2 ; PR11107
      3 
      4 define i32 @test(i32 %a, i32 %b) {
      5 entry:
      6 ; CHECK:        cmp
      7 ; CHECK-NEXT:   it    mi
      8 ; CHECK-NEXT:   rsbmi
      9 ; CHECK-NEXT:   cmp
     10 ; CHECK-NEXT:   it    mi
     11 ; CHECK-NEXT:   rsbmi
     12  %cmp1 = icmp slt i32 %a, 0
     13  %sub1 = sub nsw i32 0, %a
     14  %abs1 = select i1 %cmp1, i32 %sub1, i32 %a
     15  %cmp2 = icmp slt i32 %b, 0
     16  %sub2 = sub nsw i32 0, %b
     17  %abs2 = select i1 %cmp2, i32 %sub2, i32 %b
     18  %add = add nsw i32 %abs1, %abs2
     19  ret i32 %add
     20 }
     21