[llvm] [NVPTX] Fix segfault with i128 types in arrays (PR #120562)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 13:51:50 PST 2025
================
@@ -261,6 +261,15 @@ static void ComputePTXValueVTs(const TargetLowering &TLI, const DataLayout &DL,
return;
}
+ // Given an array type, recursively traverse the elements with custom ComputePTXValueVTs.
+ if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
+ Type *EltTy = ATy->getElementType();
+ uint64_t EltSize = DL.getTypeAllocSize(EltTy);
+ for (auto i : llvm::seq<int>(ATy->getNumElements()))
----------------
Artem-B wrote:
Style nit: variables should start with a capital. Also auto is not useful here. So, `int I`.
https://github.com/llvm/llvm-project/pull/120562
More information about the llvm-commits
mailing list