brintos

brintos / llvm-project-archived public Read only

0
0
Text · 831 B · 8b21741 Raw
42 lines · plain
1; RUN: opt -passes=jump-threading -S < %s | FileCheck %s2define void @test() {3bb:4  %tmp = call i32 @a()5  %tmp1 = icmp eq i32 %tmp, 16  br i1 %tmp1, label %bb5, label %bb27; CHECK: br i1 %tmp1,{{.*}} !prof ![[PROF1:[0-9]+]]8 9bb2:10  %tmp3 = call i32 @b()11  %tmp4 = icmp ne i32 %tmp3, 112  br label %bb513; CHECK: br i1 %tmp4, {{.*}} !prof ![[PROF2:[0-9]+]]14 15bb5:16  %tmp6 = phi i1 [ false, %bb ], [ %tmp4, %bb2 ]17  br i1 %tmp6, label %bb8, label %bb7, !prof !018 19bb7:20  call void @bar()21  br label %bb922 23bb8:24  call void @foo()25  br label %bb926 27bb9:28  ret void29}30 31declare void @bar()32 33declare void @foo()34 35declare i32 @a()36 37declare i32 @b()38 39!0 = !{!"branch_weights", i32 2146410443, i32 1073205}40;CHECK: ![[PROF1]] = !{!"branch_weights", i32 1073205, i32 2146410443}41;CHECK: ![[PROF2]] = !{!"branch_weights", i32 -2147483648, i32 0}42