[llvm] [SPIR-V] Support printing OpConstantF literals wider than 64 bits (PR #208219)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 00:57:19 PDT 2026


================
@@ -0,0 +1,29 @@
+# RUN: llc -O0 -mtriple=spirv32-unknown-unknown -start-after=finalize-isel -verify-machineinstrs %s -o - | FileCheck %s
+
+# Exercises the SPIRVInstPrinter's OpConstantF path for literals wider than
+# 64 bits (e.g. fp128), independent of how the OpConstantF instruction with
+# more than two literal words was produced.
+
+--- |
+  define fp128 @getConstantFP128() {
+    ret fp128 0xL00000000000000004001000000000000
+  }
----------------
jmmartinez wrote:

M... but wait, if _"fp128 is not valid standard SPIR-V"_ shouldn't we try to reject it early in the verifier instead?

Sorry for not bringing this in earlier. I thought it was supported since it is in the IEEE 754 standard.

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


More information about the llvm-commits mailing list