diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineOperand.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp index 0ea495bf0c0..7b8f0110092 100644 --- a/llvm/lib/CodeGen/MachineOperand.cpp +++ b/llvm/lib/CodeGen/MachineOperand.cpp @@ -930,13 +930,13 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST, } case MachineOperand::MO_ShuffleMask: OS << "shufflemask("; - const Constant* C = getShuffleMask(); - const int NumElts = C->getType()->getVectorNumElements(); - + ArrayRef<int> Mask = getShuffleMask(); StringRef Separator; - for (int I = 0; I != NumElts; ++I) { - OS << Separator; - C->getAggregateElement(I)->printAsOperand(OS, false, MST); + for (int Elt : Mask) { + if (Elt == -1) + OS << Separator << "undef"; + else + OS << Separator << Elt; Separator = ", "; } |