llvm-project
90b8a481 - [SPIRV] Support additional comparison predicates for i1 types (#174585)

Commit
14 days ago
[SPIRV] Support additional comparison predicates for i1 types (#174585) Previously, the SPIRV BE only handled equality and inequality comparisons (ICMP_EQ, ICMP_NE) for i1 types using logical operations (OpLogicalEqual, OpLogicalNotEqual). Other comparison predicates (signed/unsigned less than, greater than, etc.) triggered an unreachable assertion. This patch extends the support for the missing predicates. The BE considers i1 values as booleans and in SPIR-V only logical operations can work on them. This patch lowers the missing predicates into supported logical operations. The lowering has been validated with instcombine to avoid introducing an unsound transformation (using the new test case).
Author
Parents
Loading