diff options
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlan.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlan.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp index 654cb6dac07..00571d05939 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp @@ -735,9 +735,10 @@ void VPPredInstPHIRecipe::print(raw_ostream &O, const Twine &Indent) const { void VPWidenMemoryInstructionRecipe::print(raw_ostream &O, const Twine &Indent) const { O << " +\n" << Indent << "\"WIDEN " << VPlanIngredient(&Instr); - if (User) { + VPValue *Mask = getMask(); + if (Mask) { O << ", "; - User->getOperand(0)->printAsOperand(O); + Mask->printAsOperand(O); } O << "\\l\""; } diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index 09af085faaf..d35278332be 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -1015,7 +1015,7 @@ public: /// Return the mask used by this recipe. Note that a full mask is represented /// by a nullptr. - VPValue *getMask() { + VPValue *getMask() const { // Mask is the last operand. return User ? User->getOperand(User->getNumOperands() - 1) : nullptr; } |

