[PATCH] D132938: [AMDGPU] Fix crash legalizing G_EXTRACT_VECTOR_ELT with negative index
Peter Rong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 08:33:47 PDT 2022
Peter added a comment.
Agree. This case seems unique to `i1`. Any other index with negative constant value would be ignored by translator.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2392
unsigned NumElts = VecTy.getNumElements();
if (IdxVal < NumElts) {
SmallVector<Register, 8> SrcRegs;
----------------
You might want to add the non-negative test here too. However, I haven't been able to find a test case that crashed here yet.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132938/new/
https://reviews.llvm.org/D132938
More information about the llvm-commits
mailing list