brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 6302cde Raw
45 lines · plain
1; RUN: llc -mtriple=hexagon -disable-block-placement < %s | FileCheck %s2 3; Check that the branch to the block b10 is marked as taken (i.e. ":t").4; CHECK-LABEL: foo5; CHECK: if ({{.*}}) jump:t .LBB0_[[LAB:[0-9]+]]6; CHECK: [[LAB]]:7; CHECK: add({{.*}},#65)8 9target triple = "hexagon"10 11define i32 @foo(i32 %a0) local_unnamed_addr #0 {12b1:13  %v2 = icmp eq i32 %a0, 014  br i1 %v2, label %b3, label %b10, !prof !015 16b3:                                               ; preds = %b117  br label %b418 19b4:                                               ; preds = %b4, %b320  %v5 = phi i32 [ %v6, %b4 ], [ 0, %b3 ]21  %v6 = add nuw nsw i32 %v5, 122  %v7 = mul nuw nsw i32 %v5, 6723  %v8 = tail call i32 @bar(i32 %v7) #024  %v9 = icmp eq i32 %v6, 1025  br i1 %v9, label %b13, label %b426 27b10:                                              ; preds = %b128  %v11 = add nsw i32 %a0, 6529  %v12 = tail call i32 @bar(i32 %v11) #030  br label %b1431 32b13:                                              ; preds = %b433  br label %b1434 35b14:                                              ; preds = %b13, %b1036  %v15 = phi i32 [ %v12, %b10 ], [ 0, %b13 ]37  ret i32 %v1538}39 40declare i32 @bar(i32) local_unnamed_addr #041 42attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b,-long-calls" }43 44!0 = !{!"branch_weights", i32 1, i32 2000}45