[llvm] [SPIRV] Add FPEncoding operand support for OpTypeFloat (PR #156871)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 06:37:27 PDT 2025


YixingZhang007 wrote:

I’ve updated this PR by changing the approach for tracking the type of floating-point registers (IEEE 754 vs. Bfloat).
Previously, we used an `FPVariant` class along with a `VRegFPVariantMap` to map registers to their floating-point type. Now, I’ve replaced these with an `FPEncoding` enum class and modified the SPIR-V instruction format for floating point registers from `OpTypeFloat $bitwidth` to `OpTypeFloat $bitwidth $FPEncoding`. This way, the floating-point type can be directly distinguished from the second operand of the OpTypeFloat instruction.

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


More information about the llvm-commits mailing list