-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[NFC][StructurizeCFG] Add a test that can crash StructurizeCFG pass #126087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@llvm/pr-subscribers-llvm-transforms Author: Shilei Tian (shiltian) ChangesI tried to fix it in #124051 but failed to do so. This PR adds the test and Full diff: https://github.com/llvm/llvm-project/pull/126087.diff 1 Files Affected:
diff --git a/llvm/test/Transforms/StructurizeCFG/simple-structurizecfg-crash.ll b/llvm/test/Transforms/StructurizeCFG/simple-structurizecfg-crash.ll
new file mode 100644
index 000000000000000..745b0bdc0382ada
--- /dev/null
+++ b/llvm/test/Transforms/StructurizeCFG/simple-structurizecfg-crash.ll
@@ -0,0 +1,18 @@
+; RUN: opt -S -passes=structurizecfg %s -o -
+; XFAIL: *
+
+; FIXME: This test is expected to crash. Generate checklines after the crash is fixed.
+
+define void @foo() {
+entry:
+ br i1 false, label %cond.true, label %cond.false
+
+cond.true: ; preds = %entry
+ br label %cond.end
+
+cond.false: ; preds = %entry
+ br label %cond.end
+
+cond.end: ; preds = %cond.false, %cond.true
+ ret void
+}
|
arsenm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also open a tracking issue and add a reference to the test (like in the file name)
I tried to fix it in #124051 but failed to do so. This PR adds the test and marks it as xfail.
6487e53 to
4a55d9a
Compare
Done. |
|
This test fails in our (Fuchsia) toolchain CI linux host builders. I am currently investigating this. Link to the logs: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8723305309974990577/+/u/clang/tests/stdout |
|
I'm also seeing the test XPASS on my bot which builds without assertions enabled: |
| @@ -0,0 +1,19 @@ | |||
| ; RUN: opt -S -passes=structurizecfg %s -o - | |||
| ; XFAIL: * | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires asserts
…lvm#126087) I tried to fix it in llvm#124051 but failed to do so. This PR adds the test and marks it as xfail.
…lvm#126087) I tried to fix it in llvm#124051 but failed to do so. This PR adds the test and marks it as xfail.

I tried to fix it in #124051 but failed to do so. This PR adds the test and
marks it as xfail.