-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
[Loads] Fix crash in isSafeToLoadUnconditionally with scalable accessed type #82650
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 | ||
; RUN: opt < %s -passes=vector-combine -S -mtriple=riscv32 -mattr=+v | FileCheck %s -check-prefixes=CHECK,RV32 | ||
; RUN: opt < %s -passes=vector-combine -S -mtriple=riscv64 -mattr=+v | FileCheck %s -check-prefixes=CHECK,RV64 | ||
|
||
define void @fixed_load_scalable_src() { | ||
; CHECK-LABEL: define void @fixed_load_scalable_src( | ||
; CHECK-SAME: ) #[[ATTR0:[0-9]+]] { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: store <vscale x 4 x i16> zeroinitializer, ptr null, align 8 | ||
; CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr null, align 8 | ||
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i16> [[TMP0]], <4 x i16> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison> | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
store <vscale x 4 x i16> zeroinitializer, ptr null | ||
lukel97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
%0 = load <4 x i16>, ptr null | ||
%1 = shufflevector <4 x i16> %0, <4 x i16> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison> | ||
ret void | ||
} | ||
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | ||
; RV32: {{.*}} | ||
; RV64: {{.*}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop the RV32/RV64 prefixes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't have them initially but UTC complained about differing CHECK lines?
Inspecting the actual check lines it seems to be the same though bar the attributes, which is why I presume it's complaining. Dropped them anyway. |
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.
VectorCombine::widenSubvectorLoad
triggers the crash here when callingisSafeToLoadUnconditionally
. Let me know if there's a better place to test for this!