[llvm] [SPIR-V] Emit ceil(Bitwidth / 32) words during OpConstant creation (PR #180218)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 05:41:38 PST 2026


================
@@ -21,3 +27,10 @@ entry:
   store i128 0, ptr addrspace(4) %p, align 16
   ret void
 }
+
+define spir_func void @test_i96_const(ptr addrspace(4) %p) addrspace(4) {
----------------
MrSidims wrote:

It's possible, in this case 4 words will be emitted. For i97 and for the constant in the test it would result in `1 0 1 0`, following numbers results in `2 0 1 0`, `3 0 1 0` etc. 2^96 results in `0 0 0 1`. So it seem correct to me.

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


More information about the llvm-commits mailing list