[PATCH] D147058: [SimpleLoopUnswitch] Fix SCEV invalidation issue
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 09:19:56 PDT 2023
bjope created this revision.
bjope added a reviewer: fhahn.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
bjope requested review of this revision.
Herald added a project: LLVM.
This patch is making sure that we use getTopMostExitingLoop when
finding out which loops to forget, when dealing with
unswitchNontrivialInvariants and unswitchTrivialSwitch. It seems
to at least be needed for unswitchNontrivialInvariants as detected
by the included test case.
Note that unswitchTrivialBranch already used getTopMostExitingLoop.
This was done in commit 4a9cde5a791cd49b96993e6 <https://reviews.llvm.org/rG4a9cde5a791cd49b96993e61d0f2401b81b6212d>. The commit
message in that commit says "If the patch makes sense, I will also
update those places to a similar approach ...", referring to these
functions mentioned above. As far as I can tell that never happened,
but this is an attempt to finally fix that.
Fixes https://github.com/llvm/llvm-project/issues/61080
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147058
Files:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
llvm/test/Transforms/SimpleLoopUnswitch/update-scev-3.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147058.509045.patch
Type: text/x-patch
Size: 11141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230328/3c82575b/attachment.bin>
More information about the llvm-commits
mailing list