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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 08:49:35 PST 2024


================
@@ -1409,16 +1409,32 @@ static void WriteOptimizationInfo(raw_ostream &Out, const User *U) {
 static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
                                   AsmWriterContext &WriterCtx) {
   if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
-    if (CI->getType()->isIntegerTy(1)) {
-      Out << (CI->getZExtValue() ? "true" : "false");
-      return;
+    if (CI->getType()->isVectorTy()) {
----------------
nikic wrote:

`Type *Ty = CI->getType()` maybe?

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


More information about the llvm-commits mailing list