[llvm] [LoopVectorize] Fix double-application of FindIV reduction expression in epilogue (PR #219362)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 01:17:18 PDT 2026


================
@@ -879,18 +879,8 @@ static bool hasUnsupportedHeaderPhiRecipe(VPlan &Plan) {
               RecurrenceDescriptor::isFindLastRecurrenceKind(Kind) ||
               !RedPhi->getUnderlyingValue())
             return true;
-          // TODO: Add support for FindIV reductions with sunk expressions: the
-          // resume value from the main loop is in expression domain (e.g.,
-          // mul(ReducedIV, 3)), but the epilogue tracks raw IV values. A sunk
-          // expression is identified by a non-VPInstruction user of
-          // ComputeReductionResult.
----------------
lukel97 wrote:

I think we still need to keep this TODO

https://github.com/llvm/llvm-project/pull/219362


More information about the llvm-commits mailing list