Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon < %s | FileCheck %s
      2 
      3 ; Predicated (old) taken jumps weren't supported prior to V60. The purpose
      4 ; of this  test is to make sure that these instructions are not
      5 ; generated for V55.
      6 
      7 ; CHECK-NOT: if ({{!?}}p{{[0-3]}}) jump:t
      8 
      9 %s.0 = type { %s.0*, i8 }
     10 
     11 define i32 @f0(%s.0** nocapture %a0, i32 %a1) #0 {
     12 b0:
     13   %v0 = and i32 %a1, 63
     14   %v1 = icmp eq i32 %v0, %a1
     15   br i1 %v1, label %b1, label %b7
     16 
     17 b1:                                               ; preds = %b0
     18   %v2 = tail call i8* @f1()
     19   br label %b2
     20 
     21 b2:                                               ; preds = %b4, %b1
     22   %v3 = phi i32 [ %v9, %b4 ], [ 0, %b1 ]
     23   %v4 = phi i32 [ %v5, %b4 ], [ 0, %b1 ]
     24   %v5 = add i32 %v4, 1
     25   %v6 = icmp ult i32 %v5, 7
     26   br i1 %v6, label %b3, label %b5
     27 
     28 b3:                                               ; preds = %b2
     29   %v7 = tail call %s.0* @f2(i8* undef, i8* %v2)
     30   %v8 = icmp eq %s.0* %v7, null
     31   br i1 %v8, label %b7, label %b4
     32 
     33 b4:                                               ; preds = %b3
     34   %v9 = select i1 undef, i32 1, i32 %v3
     35   br label %b2
     36 
     37 b5:                                               ; preds = %b2
     38   br i1 undef, label %b7, label %b6
     39 
     40 b6:                                               ; preds = %b5
     41   br label %b7
     42 
     43 b7:                                               ; preds = %b6, %b5, %b3, %b0
     44   %v10 = phi i32 [ -1, %b0 ], [ 1, %b6 ], [ %v3, %b5 ], [ -1, %b3 ]
     45   ret i32 %v10
     46 }
     47 
     48 declare i8* @f1()
     49 
     50 declare %s.0* @f2(i8*, i8*)
     51 
     52 attributes #0 = { nounwind "target-cpu"="hexagonv55" }
     53