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

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


================
@@ -88,6 +92,11 @@ class SPIRVGlobalRegistry : public SPIRVIRMapping {
   // map of aliasing decorations to aliasing metadata
   std::unordered_map<const MDNode *, MachineInstr *> AliasInstMDMap;
 
+  // Maps floating point Registers to their FPVariant (float type kind), given
+  // the MachineFunction.
+  DenseMap<const MachineFunction *, DenseMap<Register, FPVariant>>
----------------
YixingZhang007 wrote:

Sorry that there was a mistake in my initial thinking. I thought `OpTypeFloat` was a non-variadic SPIR-V operation, so all floating points would be represented with instruction `OpTypeFloat 16`. I have updated `OpTypeFloat` to now be a variadic operation. Thanks  :)

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


More information about the llvm-commits mailing list