Arith-to-SPIRV Dialect conversion unconditionally uses `SPV_KHR_integer_wrap_decoration`
Open
mlir
mlir:arith
mlir:spirv
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The `ElementwiseArithOpPattern` from `ArithToSPIRV` uses the `NoSignedWrap`/`NoUnsignedWrap` decorations unconditionally. However, there needs to be a check for one or the other in the environment:
- SPIR-V version 1.4+ (the decorations are core from there)
- availability of `SPV_KHR_integer_wrap_decoration`
Most likely, the pattern for Arith operations with nuw/nsw should fail if we can't use the SPIR-V counterparts.
Contributor guide
Assessment
This issue has not been assessed yet.