[PATCH] D108107: [LoopFlatten] Fix overflow check

Rosie Sumpter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 07:36:57 PDT 2021


RosieSumpter added a comment.

In D108107#2946377 <https://reviews.llvm.org/D108107#2946377>, @dmgreen wrote:

> I think this needs to check that the GEP is used by a load/store that is executed on each iteration.
>
> Can this use one of the isGuaranteedToExecute function too? There is a isGuaranteedToExecuteForEveryIteration, but it does not look very powerful. It may be OK for most loops though, where checking the inner loop header is enough.

Hopefully this change is what you had in mind - I'm just not sure whether the

  if (isa<LoadInst>(GEPUser) || isa<StoreInst>(GEPUser))

is necessary (can a GEP be used by something that isn't a store or a load?)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108107/new/

https://reviews.llvm.org/D108107



More information about the llvm-commits mailing list