[llvm] [AMDGPU][LibCallSimplify] Use target type's float-semantics in `ConstantFP::get` (PR #213721)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 02:09:58 PDT 2026


================
@@ -814,6 +814,12 @@ static Constant *getConstantFloatVector(const ArrayRef<APFloat> Values,
     APF.convert(FltSem, APFloat::rmNearestTiesToEven, &Unused);
     ConstValues.push_back(ConstantFP::get(ElemTy, APF));
   }
+
+  if (!Ty->isVectorTy()) {
+    assert(Values.size() == 1 && "Expected exactly one constant value");
----------------
jmmartinez wrote:

I've picked the later version.

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


More information about the llvm-commits mailing list