[PATCH] D119661: [LV] Support chained phis as incoming values for first-order recurs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 03:41:32 PST 2022


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

If the incoming previous value of a first-order recurrence is a phi in
the header, go through incoming values from the latch until we find a
non-phi value. Use this as the new Previous, all uses in the header
will be dominated by the original phi, but need to be moved after
the non-phi previous value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119661

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119661.408249.patch
Type: text/x-patch
Size: 39268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220213/9f7c5f7d/attachment-0001.bin>


More information about the llvm-commits mailing list