[llvm] [LLVM][CodeGen][X86] Add ConstantInt/FP based vector support to MachineInstr fixup and printing code. (PR #137331)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 07:23:13 PDT 2025


================
@@ -1568,9 +1568,23 @@ static void printConstant(const Constant *COp, unsigned BitWidth,
   if (isa<UndefValue>(COp)) {
     CS << "u";
   } else if (auto *CI = dyn_cast<ConstantInt>(COp)) {
-    printConstant(CI->getValue(), CS, PrintZero);
+    if (auto VTy = dyn_cast<FixedVectorType>(CI->getType())) {
+      for (unsigned I = 0, E = VTy->getNumElements(); I != E; ++I) {
+        if (I != 0)
+          CS << ",";
----------------
arsenm wrote:

```suggestion
          CS << ',';
```

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


More information about the llvm-commits mailing list