llvm / llvm/llvm-project

Arith-to-SPIRV Dialect conversion unconditionally uses `SPV_KHR_integer_wrap_decoration`

Open
#187,450 2 comments 0 reactions 1 assignee Claimed by @AGindinson View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.