[PATCH] D71539: [SCEV] Look through trivial PHIs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 02:49:40 PDT 2021
fhahn added a comment.
In D71539#3028807 <https://reviews.llvm.org/D71539#3028807>, @bmahjour wrote:
> `DependenceInfo::classifyPair` in DA incorrectly classifies the subscripts in the above test case as SIV, where it used to classify them as non-linear (because one of the subscripts was not an AddRec). In theory we should be able to threat them as MIV I think.
Thanks for the test-case. Note that the same issue already exists without the patch if uses of the LCSSA phi node `%c.1.lcssa` are replace by its incoming value in the shared test case.
The issue seems to be that `DependenceInfo::classifyPair` does not properly account for the fact that we could have AddRecs from sibling loops. It only checks the depth of the the loop of the AddRec, which means we incorrectly determine that 2 AddRecs are linear induction variables for the same loop AFAICT.
Shouldn't we consider AddRecs from sibling loops as invariant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71539/new/
https://reviews.llvm.org/D71539
More information about the llvm-commits
mailing list