brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 9c186f7 Raw
47 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=gvn -S | FileCheck %s3 4; This test checks that we don't hang trying to split a critical edge in scalar5; PRE when the control flow uses a callbr instruction.6 7define void @wombat(i64 %arg, ptr %arg1, i64 %arg2, ptr %arg3) {8; CHECK-LABEL: @wombat(9; CHECK-NEXT:  bb:10; CHECK-NEXT:    [[TMP5:%.*]] = or i64 [[ARG2:%.*]], [[ARG:%.*]]11; CHECK-NEXT:    callbr void asm sideeffect "", "!i,!i"()12; CHECK-NEXT:    to label [[BB6:%.*]] [label [[BB7:%.*]], label %bb.bb9_crit_edge]13; CHECK:       bb.bb9_crit_edge:14; CHECK-NEXT:    [[DOTPRE:%.*]] = trunc i64 [[TMP5]] to i3215; CHECK-NEXT:    br label [[BB9:%.*]]16; CHECK:       bb6:17; CHECK-NEXT:    br label [[BB7]]18; CHECK:       bb7:19; CHECK-NEXT:    [[TMP8:%.*]] = trunc i64 [[TMP5]] to i3220; CHECK-NEXT:    tail call void @barney(i32 [[TMP8]])21; CHECK-NEXT:    br label [[BB9]]22; CHECK:       bb9:23; CHECK-NEXT:    [[TMP10_PRE_PHI:%.*]] = phi i32 [ [[DOTPRE]], [[BB_BB9_CRIT_EDGE:%.*]] ], [ [[TMP8]], [[BB7]] ]24; CHECK-NEXT:    store i32 [[TMP10_PRE_PHI]], ptr [[ARG3:%.*]], align 425; CHECK-NEXT:    ret void26;27bb:28  %tmp5 = or i64 %arg2, %arg29  callbr void asm sideeffect "", "!i,!i"()30  to label %bb6 [label %bb7, label %bb9]31 32bb6:                                              ; preds = %bb33  br label %bb734 35bb7:                                              ; preds = %bb6, %bb36  %tmp8 = trunc i64 %tmp5 to i3237  tail call void @barney(i32 %tmp8)38  br label %bb939 40bb9:                                              ; preds = %bb7, %bb41  %tmp10 = trunc i64 %tmp5 to i3242  store i32 %tmp10, ptr %arg343  ret void44}45 46declare void @barney(i32)47