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

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 07:22:57 PDT 2025


================
@@ -422,6 +431,10 @@ class SPIRVGlobalRegistry : public SPIRVIRMapping {
   // structures referring this instruction.
   void invalidateMachineInstr(MachineInstr *MI);
 
+  // Return the FPVariant of to the given floating-point regiester.
----------------
YixingZhang007 wrote:

Thanks for the suggestion! I’ve updated the approach for representing floating-point types in the PR. `FPVariant` and `VRegFPVariantMap` are no longer used. Instead, we introduced an `FPEncoding` enum class, which is now placed as the second operand of `OpTypeFloat` SPIR-V instruction. Please feel free to let me know if there’s anything I can improve with the current approach. Thank you! :)

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


More information about the llvm-commits mailing list