[all-commits] [llvm/llvm-project] 44773b: [SimpleLoopUnswitch] Fix SCEV invalidation issue
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Thu Apr 6 00:47:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 44773b798a024d39084fe710ccfb2851eb0df5d4
https://github.com/llvm/llvm-project/commit/44773b798a024d39084fe710ccfb2851eb0df5d4
Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2023-04-06 (Thu, 06 Apr 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
A llvm/test/Transforms/SimpleLoopUnswitch/update-scev-3.ll
Log Message:
-----------
[SimpleLoopUnswitch] Fix SCEV invalidation issue
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. 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
Differential Revision: https://reviews.llvm.org/D147058
More information about the All-commits
mailing list