[PATCH] D104148: [LoopUtils] Fix incorrect runtime checks
Mindong Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 15 07:16:42 PDT 2021
mdchen marked 4 inline comments as done.
mdchen added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:1538
- if (SE->isLoopInvariant(Sc, TheLoop)) {
+ if (SE->isLoopInvariant(Sc, TheLoop) && CG->Members.size() == 1) {
LLVM_DEBUG(dbgs() << "LAA: Adding RT check for a loop invariant ptr:"
----------------
fhahn wrote:
> Can we instead directly check if `CG->Low == Sc` and `CG->High == SC + 1`, which is the assumption for the check that is generated?
>
> As an additional test case, could you add a case where we have 2 invariant members with the same addresses, if that's possible?
Thanks! Have added a test for invariant members with the same addresses. But the check should be `CG->Low == CG->High` IIUC.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104148/new/
https://reviews.llvm.org/D104148
More information about the llvm-commits
mailing list