Skip to content

Commit 6487e53

Browse files
committed
[NFC][StructurizeCFG] Add a test that can crash StructurizeCFG pass
I tried to fix it in #124051 but failed to do so. This PR adds the test and marks it as xfail.
1 parent 2f7d3ec commit 6487e53

File tree

1 file changed

+18
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)