[llvm] 080a071 - [LoopUnroll] Add additional DT verification test for D141487.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 09:26:32 PST 2023
Author: Florian Hahn
Date: 2023-01-11T17:26:13Z
New Revision: 080a07199e8c146a58ef3506cfcbf554eced21fc
URL: https://github.com/llvm/llvm-project/commit/080a07199e8c146a58ef3506cfcbf554eced21fc
DIFF: https://github.com/llvm/llvm-project/commit/080a07199e8c146a58ef3506cfcbf554eced21fc.diff
LOG: [LoopUnroll] Add additional DT verification test for D141487.
Added:
llvm/test/Transforms/LoopUnroll/verify-dominators.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopUnroll/verify-dominators.ll b/llvm/test/Transforms/LoopUnroll/verify-dominators.ll
new file mode 100644
index 0000000000000..9b3cb3c5b12fe
--- /dev/null
+++ b/llvm/test/Transforms/LoopUnroll/verify-dominators.ll
@@ -0,0 +1,38 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes=loop-unroll -unroll-verify-domtree -verify-dom-info -S %s | FileCheck %s
+
+define void @test() {
+; CHECK-LABEL: @test(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP_HEADER:%.*]]
+; CHECK: loop.header:
+; CHECK-NEXT: br label [[LOOP_LATCH:%.*]]
+; CHECK: loop.latch:
+; CHECK-NEXT: br i1 true, label [[LOOP_HEADER_1:%.*]], label [[LOOP_EXIT:%.*]]
+; CHECK: loop.header.1:
+; CHECK-NEXT: br i1 true, label [[EXIT_LOOPEXIT:%.*]], label [[LOOP_LATCH_1:%.*]]
+; CHECK: loop.latch.1:
+; CHECK-NEXT: br label [[LOOP_EXIT]]
+; CHECK: loop.exit:
+; CHECK-NEXT: br label [[EXIT:%.*]]
+; CHECK: exit.loopexit:
+; CHECK-NEXT: br label [[EXIT]]
+; CHECK: exit:
+; CHECK-NEXT: ret void
+;
+entry:
+ br label %loop.header
+
+loop.header:
+ %exitcond = phi i1 [ true, %loop.latch ], [ false, %entry ]
+ br i1 %exitcond, label %exit, label %loop.latch
+
+loop.latch:
+ br i1 true, label %loop.header, label %loop.exit
+
+loop.exit:
+ br label %exit
+
+exit:
+ ret void
+}
More information about the llvm-commits
mailing list