[llvm] Add case to TargetLowering::getValueType() to fix AMDGPU <N x ptr(7)> crash (PR #126642)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 13:23:18 PST 2025
================
@@ -1675,8 +1675,8 @@ class TargetLoweringBase {
/// operations except for the pointer size. If AllowUnknown is true, this
/// will return MVT::Other for types with no EVT counterpart (e.g. structs),
/// otherwise it will assert.
- EVT getValueType(const DataLayout &DL, Type *Ty,
- bool AllowUnknown = false) const {
+ virtual EVT getValueType(const DataLayout &DL, Type *Ty,
----------------
krzysz00 wrote:
I've added some handling to getValueType()
And ... I'm not sure. The getValueType() came in from the loop vectorizer wanting to know how many registers would be needed to hold some value, and that led to the crash. It didn't help that, per comments from the last workaround of this sort I needed, there're a lot of pre-codegen uses of `MVT getPointerTYpe(unsigned AS);` that needed to be worked around with `MVT::v5i32`
https://github.com/llvm/llvm-project/pull/126642
More information about the llvm-commits
mailing list