llvm-project
6e0054aa - [Scalarizer] Fix out-of-bounds crash (#180359)

Commit
20 days ago
[Scalarizer] Fix out-of-bounds crash (#180359) When processing an extractelement instruction with an index that exceeds the vector size (e.g., extracting index 2147483647 from a 4-element vector), the scalarizer would calculate an out-of-bounds Fragment index and crash with an assertion failure in `SmallVector::operator[]`. This PR adds a bounds check in `ScalarizerVisitor::visitExtractElementInst` to prevent a crash when the extractelement index is out of bounds. Fixes #179880
Author
Parents
Loading