diff options
| author | Florian Hahn <flo@fhahn.com> | 2021-12-28 15:37:28 +0100 |
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2021-12-28 15:37:47 +0100 |
| commit | c2275278c693c4e0d6947c6f1ae95bf147f29125 (patch) | |
| tree | a4b56b17f8356f47066fa3d7fe8fd32f80ad4aec /llvm/lib/Transforms/Vectorize/VPlan.cpp | |
| parent | 693b1f1e1bd1bc2060ea8cfd2129cb0123397a8c (diff) | |
[VPlan] Add abstract base class for header phi recipes (NFC).
Not all header phis widen the phi, e.g. like the new
VPCanonicalIVPHIRecipe in D113223. To let those recipes also inherit
from a phi-like base class, add a more generic VPHeaderPHIRecipe
abstract base class.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D116304
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VPlan.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlan.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp index 1d9e71663cd2..bebc6bbdd4a7 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp @@ -838,7 +838,7 @@ void VPlan::execute(VPTransformState *State) { // vector loop. VPBasicBlock *Header = Entry->getEntryBasicBlock(); for (VPRecipeBase &R : Header->phis()) { - auto *PhiR = dyn_cast<VPWidenPHIRecipe>(&R); + auto *PhiR = dyn_cast<VPHeaderPHIRecipe>(&R); if (!PhiR || !(isa<VPFirstOrderRecurrencePHIRecipe>(&R) || isa<VPReductionPHIRecipe>(&R))) continue; @@ -1461,7 +1461,7 @@ void VPInterleavedAccessInfo::visitBlock(VPBlockBase *Block, Old2NewTy &Old2New, InterleavedAccessInfo &IAI) { if (VPBasicBlock *VPBB = dyn_cast<VPBasicBlock>(Block)) { for (VPRecipeBase &VPI : *VPBB) { - if (isa<VPWidenPHIRecipe>(&VPI)) + if (isa<VPHeaderPHIRecipe>(&VPI)) continue; assert(isa<VPInstruction>(&VPI) && "Can only handle VPInstructions"); auto *VPInst = cast<VPInstruction>(&VPI); |
