[llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 08:20:21 PST 2024


================
@@ -1444,6 +1460,10 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
         // Reparse stringized version!
         if (APFloat(APFloat::IEEEdouble(), StrVal).convertToDouble() == Val) {
           Out << StrVal;
+
+          if (CFP->getType()->isVectorTy())
+            Out << ")";
----------------
paulwalker-arm wrote:

I've landed https://github.com/llvm/llvm-project/commit/4f13f353cc8dc472a3f00932bc42179776f0f684 so the vector support can just wrap the call.

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


More information about the llvm-commits mailing list