llvm
d226dcc0 - [NVPTX] Fix illegal combineInsertEltToShuffle pattern (#198259)

Commit
3 days ago
[NVPTX] Fix illegal combineInsertEltToShuffle pattern (#198259) Adds a condition to the `isShuffleMaskLegal` method to prevent `combineInsertEltToShuffle` from creating an illegal `vector_shuffle` after type legalization which leads to a crash. Context: This is triggered when bitcasting a `v2f16` into a vector that type legalizes to a `v2i32`. This happens on architectures supporting packed `f32` operations (>= `sm_100`). In certain cases, this leads to `combineInsertEltToShuffle` creating a vector shuffle with `v4f16` for simplification. Since this happens after type legalization and `v4f16` is an illegal type, it leads to a crash.
Author
Parents
Loading