[llvm] [SPIRV] Rounding Mode decorations in OpenCL builtins only make sense when floating point types are involved (PR #181208)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 14 15:46:12 PST 2026


MrSidims wrote:

Strictly speaking, [OpenCL env spec](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Env.html#_rounding_modes_for_conversions) states:
```
Results of the following conversion instructions may include an optional FPRoundingMode decoration:
OpConvertFToU
OpConvertFToS
OpConvertSToF
OpConvertUToF
OpFConvert
The FPRoundingMode decoration may not be added to results of any other instruction.
```
so the patch should be more strict and filter out non-conversion instructions.

https://github.com/llvm/llvm-project/pull/181208


More information about the llvm-commits mailing list