Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon -O2 -hexagon-expand-condsets=0 < %s | FileCheck %s
      2 
      3 ; CHECK: mux
      4 ; CHECK: cmp{{.*\.new}}
      5 
      6 target triple = "hexagon"
      7 
      8 ; Function Attrs: nounwind
      9 define i32 @f0(i32 %a0, i32 %a1, i32 %a2) #0 {
     10 b0:
     11   %v0 = icmp ne i32 %a0, 0
     12   %v1 = add nsw i32 %a2, -1
     13   %v2 = select i1 %v0, i32 10, i32 %v1
     14   %v3 = icmp eq i32 %v2, %a2
     15   br i1 %v3, label %b1, label %b2
     16 
     17 b1:                                               ; preds = %b0
     18   %v4 = shl nsw i32 %a2, 1
     19   %v5 = tail call i32 @f1(i32 %v4) #0
     20   br label %b3
     21 
     22 b2:                                               ; preds = %b0
     23   %v6 = tail call i32 @f1(i32 %a0) #0
     24   br label %b3
     25 
     26 b3:                                               ; preds = %b2, %b1
     27   %v7 = phi i32 [ %v5, %b1 ], [ %v6, %b2 ]
     28   ret i32 %v7
     29 }
     30 
     31 declare i32 @f1(i32)
     32 
     33 attributes #0 = { nounwind }
     34