-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
LoopVectorize: add test for crash in #72969 #74111
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Ramkumar Ramachandra (artagnon) ChangesFull diff: https://github.com/llvm/llvm-project/pull/74111.diff 1 Files Affected:
diff --git a/llvm/test/Transforms/LoopVectorize/pr72969.ll b/llvm/test/Transforms/LoopVectorize/pr72969.ll
new file mode 100644
index 000000000000000..47d3efc10fc4c49
--- /dev/null
+++ b/llvm/test/Transforms/LoopVectorize/pr72969.ll
@@ -0,0 +1,26 @@
+; RUN: not --crash opt -passes=loop-vectorize -S < %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+@h = global i32 0, align 4
+
+define void @test(ptr %p) {
+entry:
+ br label %for.body
+
+for.body:
+ %idx.ext.merge = phi i64 [ 1, %entry ], [ %idx, %for.body ]
+ %inc.merge = phi i16 [ 1, %entry ], [ %inc, %for.body ]
+ %idx.merge = phi i64 [ 0, %entry ], [ %idx.ext.merge, %for.body ]
+ %add = shl i64 %idx.merge, 1
+ %arrayidx = getelementptr [1 x i32], ptr %p, i64 0, i64 %add
+ %0 = load i32, ptr %arrayidx, align 4
+ %inc = add i16 %inc.merge, 1
+ %idx = zext i16 %inc to i64
+ %gep = getelementptr i32, ptr %p, i64 %idx
+ %cmp = icmp ugt ptr %gep, @h
+ br i1 %cmp, label %exit, label %for.body
+
+exit:
+ ret void
+}
|
We don't use pre-commit tests for crashes. You can include it directly in the fix PR. |
85c341f
to
edf8b52
Compare
edf8b52
to
312a275
Compare
312a275
to
bf8281d
Compare
bf8281d
to
d9ad496
Compare
d9ad496
to
1afcfdf
Compare
What's the best thing to do with this PR? The test seems fine, but if it should be added as part of the actual fix does it make sense to close this and just review #74456? |
Hi @david-arm, Sorry I'm behind on my PRs: I'm currently on vacation, due to return to work in mid-March. As for this PR, since the test is fine, I think we can merge it as-is, to document the failure. I'll try to pick up #74456 soon and complete it. What do you think? |
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.
LGTM!
Yeah, seems reasonable. And no rush to finish the other patch - enjoy your vacation! |
I got a buildbot failure post-merge, although the native CI seems to have passed it. |
And this is why I told you not to pre-commit tests for crashes :) If you do this, you need to at least make it a |
Thanks for the suggestion; will attempt a quick fix. [I really shouldn't have merged something while on vacation: this is what I get] |
No description provided.