[PATCH] D118642: [IVDescriptor] Find original 'Previous' for first-order recurrences.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 12:07:32 PST 2022


fhahn created this revision.
fhahn added reviewers: Ayal, spatel.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

This patch extends first-order recurrence handling to support cases
where we already sunk an instruction for a different recurrence, but
LastPrev comes before Previous.

To handle those cases correctly, we need to find the earliest entry for
the sink-after chain, because this is references the Previous from the
original recurrence. This is needed to ensure we use the correct
instruction as sink point.

Depends on D118558 <https://reviews.llvm.org/D118558>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118642

Files:
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118642.404656.patch
Type: text/x-patch
Size: 9124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/ea56c1dd/attachment.bin>


More information about the llvm-commits mailing list