Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6902,11 +6902,9 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
// cost model won't cost it whilst the legacy will.
if (auto *FOR = dyn_cast<VPFirstOrderRecurrencePHIRecipe>(&R)) {
using namespace VPlanPatternMatch;
if (none_of(
FOR->users(),
match_fn(
m_VPInstruction<VPInstruction::FirstOrderRecurrenceSplice>(
m_VPValue(), m_VPValue()))))
if (none_of(FOR->users(),
match_fn(m_VPInstruction<
VPInstruction::FirstOrderRecurrenceSplice>())))
return true;
}
// The VPlan-based cost model is more accurate for partial reduction and
Expand Down
6 changes: 2 additions & 4 deletions llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,9 @@ struct Recipe_match {
}

bool match(const VPRecipeBase *R) const {
if (std::tuple_size<Ops_t>::value == 0) {
assert(Opcode == VPInstruction::BuildVector &&
"can only match BuildVector with empty ops");
if (std::tuple_size_v<Ops_t> == 0) {
auto *VPI = dyn_cast<VPInstruction>(R);
return VPI && VPI->getOpcode() == VPInstruction::BuildVector;
return VPI && VPI->getOpcode() == Opcode;
}

if ((!matchRecipeAndOpcode<RecipeTys>(R) && ...))
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ void UnrollState::unrollRecipeByUF(VPRecipeBase &R) {
// requiring it.
if (isa<VPScalarIVStepsRecipe, VPWidenCanonicalIVRecipe,
VPVectorPointerRecipe, VPVectorEndPointerRecipe>(Copy) ||
match(Copy, m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>(
m_VPValue())))
match(Copy,
m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>()))
Copy->addOperand(getConstantVPV(Part));

if (isa<VPVectorPointerRecipe, VPVectorEndPointerRecipe>(R))
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
VPRecipeBase *R = V->getDefiningRecipe();
if (R && V->isDefinedOutsideLoopRegions()) {
if (match(V->getDefiningRecipe(),
m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>(
m_VPValue())))
m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>()))
return false;
return all_of(R->operands(), isUniformAcrossVFsAndUFs);
}
Expand Down