[llvm] 18557c2 - [StructurizeCFG] Autogenerate checks
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 03:27:50 PDT 2022
Author: Jay Foad
Date: 2022-08-23T11:22:24+01:00
New Revision: 18557c26beefe2fcd2d8d6f4e91dad3ee66ca1b7
URL: https://github.com/llvm/llvm-project/commit/18557c26beefe2fcd2d8d6f4e91dad3ee66ca1b7
DIFF: https://github.com/llvm/llvm-project/commit/18557c26beefe2fcd2d8d6f4e91dad3ee66ca1b7.diff
LOG: [StructurizeCFG] Autogenerate checks
Added:
Modified:
llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll b/llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
index 6decec8e70ce..5f1066d74e8c 100644
--- a/llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
+++ b/llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
@@ -1,43 +1,55 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -structurizecfg %s -o - | FileCheck %s
; CHECK-NOT: br i1 true
define void @blam(i32 addrspace(1)* nocapture %arg, float %arg1, float %arg2) {
-; CHECK: bb:
+; CHECK-LABEL: @blam(
+; CHECK-NEXT: bb:
+; CHECK-NEXT: br label [[BB3:%.*]]
+; CHECK: bb3:
+; CHECK-NEXT: [[TMP:%.*]] = phi i64 [ 0, [[BB:%.*]] ], [ [[TMP1:%.*]], [[FLOW1:%.*]] ]
+; CHECK-NEXT: [[TMP4:%.*]] = fcmp ult float [[ARG1:%.*]], 3.500000e+00
+; CHECK-NEXT: [[TMP4_INV:%.*]] = xor i1 [[TMP4]], true
+; CHECK-NEXT: br i1 [[TMP4_INV]], label [[BB5:%.*]], label [[FLOW:%.*]]
+; CHECK: bb5:
+; CHECK-NEXT: [[TMP6:%.*]] = fcmp uge float 0.000000e+00, [[ARG2:%.*]]
+; CHECK-NEXT: br label [[FLOW]]
+; CHECK: Flow:
+; CHECK-NEXT: [[TMP0:%.*]] = phi i1 [ [[TMP6]], [[BB5]] ], [ [[TMP4]], [[BB3]] ]
+; CHECK-NEXT: br i1 [[TMP0]], label [[BB7:%.*]], label [[FLOW1]]
+; CHECK: bb7:
+; CHECK-NEXT: [[TMP8:%.*]] = add nuw nsw i64 [[TMP]], 1
+; CHECK-NEXT: [[TMP9:%.*]] = icmp sge i64 [[TMP8]], 5
+; CHECK-NEXT: br label [[FLOW1]]
+; CHECK: Flow1:
+; CHECK-NEXT: [[TMP1]] = phi i64 [ [[TMP8]], [[BB7]] ], [ undef, [[FLOW]] ]
+; CHECK-NEXT: [[TMP2:%.*]] = phi i32 [ 255, [[BB7]] ], [ 15, [[FLOW]] ]
+; CHECK-NEXT: [[TMP3:%.*]] = phi i1 [ [[TMP9]], [[BB7]] ], [ true, [[FLOW]] ]
+; CHECK-NEXT: br i1 [[TMP3]], label [[BB10:%.*]], label [[BB3]]
+; CHECK: bb10:
+; CHECK-NEXT: store i32 [[TMP2]], i32 addrspace(1)* [[ARG:%.*]], align 4
+; CHECK-NEXT: ret void
+;
bb:
br label %bb3
-; CHECK: bb3:
-; CHECK: %tmp4.inv = xor i1 %tmp4, true
-; CHECK: br i1 %tmp4.inv, label %bb5, label %Flow
bb3: ; preds = %bb7, %bb
%tmp = phi i64 [ 0, %bb ], [ %tmp8, %bb7 ]
%tmp4 = fcmp ult float %arg1, 3.500000e+00
br i1 %tmp4, label %bb7, label %bb5
-; CHECK: bb5:
-; CHECK: %tmp6 = fcmp uge float 0.000000e+00, %arg2
-; CHECK: br label %Flow
bb5: ; preds = %bb3
%tmp6 = fcmp olt float 0.000000e+00, %arg2
br i1 %tmp6, label %bb10, label %bb7
-; CHECK: Flow:
-; CHECK: %0 = phi i1 [ %tmp6, %bb5 ], [ %tmp4, %bb3 ]
-; CHECK: br i1 %0, label %bb7, label %Flow1
-; CHECK: bb7:
-; CHECK: br label %Flow1
bb7: ; preds = %bb5, %bb3
%tmp8 = add nuw nsw i64 %tmp, 1
%tmp9 = icmp slt i64 %tmp8, 5
br i1 %tmp9, label %bb3, label %bb10
-; CHECK: Flow1:
-; CHECK: %3 = phi i1 [ %tmp9, %bb7 ], [ true, %Flow ]
-; CHECK: br i1 %3, label %bb10, label %bb3
-; CHECK: bb10:
bb10: ; preds = %bb7, %bb5
%tmp11 = phi i32 [ 15, %bb5 ], [ 255, %bb7 ]
store i32 %tmp11, i32 addrspace(1)* %arg, align 4
More information about the llvm-commits
mailing list