[PATCH] D126307: [BasicBlockUtils] Amend test for loop metadata.
Hendrik Greving via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 10:15:02 PDT 2022
hgreving created this revision.
hgreving added a reviewer: fhahn.
Herald added a project: All.
hgreving requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Amends test Transforms/LoopSimplify/update_latch_md2.ll
with auto-generated checks.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126307
Files:
llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
Index: llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
===================================================================
--- llvm/test/Transforms/LoopSimplify/update_latch_md2.ll
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126307.431710.patch
Type: text/x-patch
Size: 1545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220524/aca88dc3/attachment.bin>
More information about the llvm-commits
mailing list