brintos

brintos / llvm-project-archived public Read only

0
0
Text · 734 B · 9fa8fb2 Raw
37 lines · plain
1; RUN: llc -mtriple=hexagon < %s2 3; Check that branch probabilities are set correctly after performing the4; simple variant of if-conversion. The converted block has a branch that5; is not analyzable.6 7target triple = "hexagon"8 9declare void @foo()10 11; CHECK-LABEL: danny12; CHECK: if (p0.new) jump:nt foo13define void @danny(i32 %x) {14  %t0 = icmp sgt i32 %x, 015  br i1 %t0, label %tail, label %exit, !prof !016tail:17  tail call void @foo();18  ret void19exit:20  ret void21}22 23; CHECK-LABEL: sammy24; CHECK: if (!p0.new) jump:t foo25define void @sammy(i32 %x) {26  %t0 = icmp sgt i32 %x, 027  br i1 %t0, label %exit, label %tail, !prof !028tail:29  tail call void @foo();30  ret void31exit:32  ret void33}34 35!0 = !{!"branch_weights", i32 1, i32 2000}36 37