Fix crash when store merging created an extract_subvector with invalid index.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
13852 ↗ | (On Diff #164571) | Shouldn't the two NewIdx expressions should be equivalent (modulo integer overflow issues)? NewIdx = ((unsigned long long) IdxC*MemVT.getVectorNumElements()) / Elts |
Comment Actions
We should make sure to do the multiplication as (unsigned long long) to give us 64-bits because vectors on the order of 2^16 are potentially reasonable and would cause an overflow at 32-bits.
Otherwise LGTM.
Comment Actions
Ok, I'm surprised that would be a realistic scenario but I'll make the change. Thanks.