[PATCH] D102743: [LoopInterhcange] Handle movement of reduction phis appropriately during transformation
Congzhe Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 20:38:12 PDT 2021
congzhe created this revision.
congzhe added reviewers: fhahn, bmahjour, Whitney.
congzhe added a project: LLVM.
Herald added a subscriber: hiraditya.
congzhe requested review of this revision.
Herald added a subscriber: llvm-commits.
This patch fixes pr43326(https://bugs.llvm.org/show_bug.cgi?id=43326) and pr48212(https://bugs.llvm.org/show_bug.cgi?id=48212). The test cases in pr43326 and pr48212 are added in lit tests.
Currently when we move reduction phis to the right place, this pass assumes the first phi in loop headers is an induction phi, skips the first phi and assume the rest of phis are candidate reduction phis to move. It may not always be true.
This patch loops over all phis in loop headers and consider an phi as a candidate reduction phi to move only when it is indeed a reduction phi across outer and inner loop.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102743
Files:
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/test/Transforms/LoopInterchange/pr43326.ll
llvm/test/Transforms/LoopInterchange/pr48212.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102743.346330.patch
Type: text/x-patch
Size: 7411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210519/54e917cc/attachment.bin>
More information about the llvm-commits
mailing list