[llvm] [Scalarizer] Fix out-of-bounds crash (PR #180359)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 21 08:22:31 PST 2026
================
@@ -16,3 +16,12 @@ define i32 @f1(ptr %src, i32 %index) {
%val2 = extractelement <4 x i32> %val1, i32 3
ret i32 %val2
}
+
+; Test that out-of-bounds extractelement doesn't crash the scalarizer.
+define void @oob_extract() {
+; ALL-LABEL: @oob_extract(
+; ALL-NEXT: ret void
+;
+ %E = extractelement <4 x ptr> zeroinitializer, i32 100
----------------
nikic wrote:
Please return %E from the function, otherwise it's unclear what the transform is actually doing now.
https://github.com/llvm/llvm-project/pull/180359
More information about the llvm-commits
mailing list