[PATCH] D37164: [ARM] Fix bug in ARMLoadStoreOptimizer when kill flags are missing.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 09:38:17 PDT 2017


MatzeB added a comment.

In https://reviews.llvm.org/D37164#854053, @gberry wrote:

> In https://reviews.llvm.org/D37164#853040, @efriedma wrote:
>
> > If I understand correctly, the original code was checking for the kill flags just to short-circuit the if statement more quickly?
>
>
> That's what it looks like to me: an attempt to reduce the calls to regsOverlap().  Or at least that would make sense for 'BaseKill'.  Checking 'OffKill' I don't get unless 'Base' and 'Off' are somehow known to be related?


Indeed checking for the kill flags is odd and removing the checks looks good to me. However there may be something about the offset register: Won't we have the same problem when the first load overwrites the offset register? So maybe we need to check for an overlap with offsetreg as well (and have a bigger problem if base+offset get overridden?)


https://reviews.llvm.org/D37164





More information about the llvm-commits mailing list