llvm-project
6abbfcae - [SPIR-V] Fix OpVectorShuffle undef emission (#151993)

Commit
87 days ago
[SPIR-V] Fix OpVectorShuffle undef emission (#151993) When an undef/poison value is lowered as a an immediate, it becomes -1. When reaching the backend, the -1 was printed as operand to OpVectorShuffle instead of the proper 0xFFFFFFFF. From the SPIR-V spec: A Component literal may also be FFFFFFFF, which means the corresponding result component has no source and is undefined. The reason the existing tests were passing `spirv-val` was because the binary format was used as output, meaning the `-1` was lowered to `0xFFFFFFFF`. But when the text format is used, `-1` is emitted as-is which is wrong. Fixes #151691
Author
Parents
Loading