summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGil Rapaport <gil.rapaport@intel.com>2019-12-28 19:59:31 +0200
committerGil Rapaport <gil.rapaport@intel.com>2019-12-29 08:50:40 +0200
commitd62bf16131e41bbe726646ac52e21b4bb38d305e (patch)
treea5250e8b2b40f57eef70aff0c2740048e08ad43d
parentae321faeedd789c7658fa3484fb51eb03911b404 (diff)
downloadbcm5719-llvm-d62bf16131e41bbe726646ac52e21b4bb38d305e.tar.gz
bcm5719-llvm-d62bf16131e41bbe726646ac52e21b4bb38d305e.zip
[LV] Use getMask() when printing recipe [NFCI]
Use dedicated API for getting the mask instead of duplicating it. Differential Revision: https://reviews.llvm.org/D71964
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.cpp5
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.h2
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;
}
OpenPOWER on IntegriCloud