[llvm] [LV] Ignore some costs when loop gets fully unrolled (PR #106699)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 06:43:03 PST 2024
================
@@ -2652,6 +2652,25 @@ static Value *getExpandedStep(const InductionDescriptor &ID,
return I->second;
}
+/// Knowing that loop \p L executes a single vector iteration, add instructions
+/// that will get simplified and thus should not have any cost to \p
+/// InstsToIgnore.
+static void addFullyUnrolledInstructionsToIgnore(
+ Loop *L, const LoopVectorizationLegality::InductionList &IL,
+ SmallPtrSetImpl<Instruction *> &InstsToIgnore) {
+ auto *Cmp = L->getLatchCmpInst();
+ if (Cmp)
----------------
fhahn wrote:
Would be good to add a test case ,if possible
https://github.com/llvm/llvm-project/pull/106699
More information about the llvm-commits
mailing list