Skip to content

Commit 71fcc82

Browse files
authored
[NFC][StructurizeCFG] Add a test that can crash StructurizeCFG pass (#126087)
I tried to fix it in #124051 but failed to do so. This PR adds the test and marks it as xfail.
1 parent c69be3f commit 71fcc82

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; RUN: opt -S -passes=structurizecfg %s -o -
2+
; XFAIL: *
3+
4+
; Issue tracking: https://github.com/llvm/llvm-project/issues/126534.
5+
; FIXME: This test is expected to crash. Generate checklines after the crash is fixed.
6+
7+
define void @foo() {
8+
entry:
9+
br i1 false, label %cond.true, label %cond.false
10+
11+
cond.true: ; preds = %entry
12+
br label %cond.end
13+
14+
cond.false: ; preds = %entry
15+
br label %cond.end
16+
17+
cond.end: ; preds = %cond.false, %cond.true
18+
ret void
19+
}

0 commit comments

Comments
 (0)