[llvm-branch-commits] [llvm] f8875c3 - [NFC][SimplifyCFG] Add test with an unreachable block with two identical successors

Roman Lebedev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 7 15:19:54 PST 2021


Author: Roman Lebedev
Date: 2021-01-08T02:15:25+03:00
New Revision: f8875c313c381764a9734dbd6e94539e8837d9f7

URL: https://github.com/llvm/llvm-project/commit/f8875c313c381764a9734dbd6e94539e8837d9f7
DIFF: https://github.com/llvm/llvm-project/commit/f8875c313c381764a9734dbd6e94539e8837d9f7.diff

LOG: [NFC][SimplifyCFG] Add test with an unreachable block with two identical successors

Added: 
    llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll b/llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll
new file mode 100644
index 000000000000..25a4ab7203f5
--- /dev/null
+++ b/llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll
@@ -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
+}


        


More information about the llvm-branch-commits mailing list