brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 6ccb874 Raw
58 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -passes=loop-deletion -S < %s | FileCheck %s3; This reduced testcase from pr65022. We are only testing that is doesn't crash.4 5define void @f(i32 %spec.select) {6; CHECK-LABEL: define void @f7; CHECK-SAME: (i32 [[SPEC_SELECT:%.*]]) {8; CHECK-NEXT:  entry:9; CHECK-NEXT:    br label [[L_OUTER:%.*]]10; CHECK:       L.outer:11; CHECK-NEXT:    br label [[IF_END:%.*]]12; CHECK:       if.end:13; CHECK-NEXT:    [[DOTB:%.*]] = load i1, ptr null, align 114; CHECK-NEXT:    [[TMP0:%.*]] = select i1 [[DOTB]], i32 0, i32 115; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[TMP0]], -116; CHECK-NEXT:    br i1 [[CMP]], label [[IF_THEN3:%.*]], label [[WHILE_COND_SPLIT_LOOP_EXIT1:%.*]]17; CHECK:       if.then3:18; CHECK-NEXT:    br label [[IF_END]]19; CHECK:       while.cond.split.loop.exit1:20; CHECK-NEXT:    [[DOTLCSSA:%.*]] = phi i32 [ [[TMP0]], [[IF_END]] ]21; CHECK-NEXT:    [[NOT_LE:%.*]] = xor i32 [[DOTLCSSA]], 122; CHECK-NEXT:    [[TOBOOL7_NOT:%.*]] = icmp eq i32 [[NOT_LE]], 023; CHECK-NEXT:    [[SPEC_SELECT3:%.*]] = select i1 [[TOBOOL7_NOT]], i32 0, i32 [[SPEC_SELECT]]24; CHECK-NEXT:    [[TOBOOL10_NOT:%.*]] = icmp eq i32 [[SPEC_SELECT3]], 025; CHECK-NEXT:    br i1 [[TOBOOL10_NOT]], label [[FOR_COND_PREHEADER:%.*]], label [[L_OUTER]]26; CHECK:       for.cond.preheader:27; CHECK-NEXT:    ret void28;29entry:30  br label %L.outer31 32L.outer:                                          ; preds = %while.cond.split.loop.exit1, %entry33  br label %if.end34 35if.end:                                           ; preds = %if.then3, %L.outer36  %.b = load i1, ptr null, align 137  %0 = select i1 %.b, i32 0, i32 138  %cmp = icmp sgt i32 %0, -139  br i1 %cmp, label %if.then3, label %while.cond.split.loop.exit140 41if.then3:                                         ; preds = %if.end42  br label %if.end43 44while.cond.split.loop.exit1:                      ; preds = %if.end45  %.lcssa = phi i32 [ %0, %if.end ]46  %not.le = xor i32 %.lcssa, 147  %tobool7.not = icmp eq i32 %not.le, 048  %spec.select3 = select i1 %tobool7.not, i32 0, i32 %spec.select49  %tobool10.not = icmp eq i32 %spec.select3, 050  br i1 %tobool10.not, label %for.cond.preheader, label %L.outer51 52for.cond.preheader:                               ; preds = %while.cond.split.loop.exit153  ret void54}55 56; uselistorder directives57uselistorder i32 0, { 1, 0, 2, 3 }58