[llvm] [SPIR-V] Replace custom bitcast in FPMaxError decoration handling (NFC) (PR #203179)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 01:25:41 PDT 2026


================
@@ -893,15 +893,6 @@ static void insertInlineAsm(MachineFunction &MF, SPIRVGlobalRegistry *GR,
   insertInlineAsmProcess(MF, GR, ST, MIRBuilder, ToProcess);
 }
 
-static uint32_t convertFloatToSPIRVWord(float F) {
-  union {
-    float F;
-    uint32_t Spir;
-  } FPMaxError;
-  FPMaxError.F = F;
-  return FPMaxError.Spir;
-}
----------------
jmmartinez wrote:

Urgh, isn't this undefined behavior ?

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


More information about the llvm-commits mailing list