[llvm] 3d5ea53 - [BasicBlockUtils] Amend test for loop metadata.
Hendrik Greving via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 09:30:16 PDT 2022
Author: Hendrik Greving
Date: 2022-08-30T09:29:52-07:00
New Revision: 3d5ea53906f16a772d7dab98df8902f909497851
URL: https://github.com/llvm/llvm-project/commit/3d5ea53906f16a772d7dab98df8902f909497851
DIFF: https://github.com/llvm/llvm-project/commit/3d5ea53906f16a772d7dab98df8902f909497851.diff
LOG: [BasicBlockUtils] Amend test for loop metadata.
Amends test Transforms/LoopSimplify/update_latch_md2.ll
with auto-generated checks.
Differential Revision: https://reviews.llvm.org/D125574
Added:
Modified:
llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopSimplify/update_latch_md2.ll b/llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
index 1d54e868890e0..8eca4bb95838c 100644
--- a/llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
+++ b/llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
@@ -1,13 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=loop-simplify -S | FileCheck %s
+
; Tests loop-simplify does not move the loop metadata, because
; the loopexit block is not the latch of the loop _bb6.
-; RUN: opt < %s -passes=loop-simplify -S | FileCheck %s
-; CHECK-LABEL: loop.header.loopexit:
-; CHECK: br label %loop.header, !llvm.loop !0
-; CHECK-LABEL: loop.latch:
-; CHECK: br i1 %p, label %loop.latch, label %loop.header.loopexit, !llvm.loop !0
-
define void @func(i1 %p) {
+; CHECK-LABEL: @func(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP_HEADER:%.*]]
+; CHECK: loop.header.loopexit:
+; CHECK-NEXT: br label [[LOOP_HEADER]], !llvm.loop [[LOOP0:![0-9]+]]
+; CHECK: loop.header:
+; CHECK-NEXT: br i1 [[P:%.*]], label [[BB1:%.*]], label [[EXIT:%.*]]
+; CHECK: bb1:
+; CHECK-NEXT: br i1 [[P]], label [[BB2:%.*]], label [[BB3:%.*]]
+; CHECK: bb2:
+; CHECK-NEXT: br label [[BB3]]
+; CHECK: bb3:
+; CHECK-NEXT: br label [[LOOP_LATCH:%.*]]
+; CHECK: loop.latch:
+; CHECK-NEXT: br i1 [[P]], label [[LOOP_LATCH]], label [[LOOP_HEADER_LOOPEXIT:%.*]], !llvm.loop [[LOOP0]]
+; CHECK: exit:
+; CHECK-NEXT: ret void
+;
entry:
br label %loop.header
More information about the llvm-commits
mailing list