[NFC][SimplifyCFG] Add test with an unreachable block with two identical successors
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 7 Jan 2021 20:23:36 +0000 (23:23 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 7 Jan 2021 23:15:25 +0000 (02:15 +0300)
llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll [new file with mode: 0644]

diff --git a/llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll b/llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll
new file mode 100644 (file)
index 0000000..25a4ab7
--- /dev/null
@@ -0,0 +1,16 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
+
+define void @fn(i1 %c) {
+; CHECK-LABEL: @fn(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    ret void
+;
+entry:
+  ret void
+
+unreachable_bb0:
+  br i1 %c, label %unreachable_bb1, label %unreachable_bb1
+unreachable_bb1:
+  br label %unreachable_bb0
+}