Currently, at least some of the llvm.experimental.constrained intrinsics are generating invalid SPIR-V. Specifically, they are adding the FPRoundingMode decoration to instructions that do not support this decoration, for the OpenCL SPIR-V environment at least, see:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Env.html#_rounding_modes_for_conversions
These validation failures are not currently flagged by spirv-val, but they may be shortly, see:
KhronosGroup/SPIRV-Tools#6537
What should we do in this case? Some options:
- Fail translation - there is nothing in SPIR-V we can translate to.
- Drop the unsupported rounding mode decorations, potentially with a warning diagnostic.
- Do nothing and keep generating invalid SPIR-V, in which case a few tests will need to be updated to stop running spirv-val.
Currently, at least some of the llvm.experimental.constrained intrinsics are generating invalid SPIR-V. Specifically, they are adding the FPRoundingMode decoration to instructions that do not support this decoration, for the OpenCL SPIR-V environment at least, see:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Env.html#_rounding_modes_for_conversions
These validation failures are not currently flagged by spirv-val, but they may be shortly, see:
KhronosGroup/SPIRV-Tools#6537
What should we do in this case? Some options: