[llvm] [llvm-c] Create a 128 bit floating point constant from 2 64 bit values (PR #164381)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 09:17:46 PDT 2025


================
@@ -1573,6 +1573,14 @@ LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char Str[],
   return wrap(ConstantFP::get(unwrap(RealTy), StringRef(Str, SLen)));
 }
 
+LLVMValueRef LLVMConstFP128(LLVMTypeRef Ty, const uint64_t N[2]) {
+  Type *T = unwrap(Ty);
+  assert(T->getPrimitiveSizeInBits() == 128 && "Ty size should be 128");
----------------
nikic wrote:

```suggestion
  assert(T->getScalarSizeInBits() == 128 && "Ty size should be 128");
```
To allow vector of float.

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


More information about the llvm-commits mailing list