[PATCH] D96399: [X86][CodeGenPrepare] Try to reuse IV's incremented value instead of adding the offset
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 28 20:08:23 PST 2021
mkazantsev added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:3848
+ if (!IVInc || !L->contains(IVInc->getParent()))
+ return None;
+ ConstantInt *Step;
----------------
reames wrote:
> You really should be able to factor out some common code here with the isIVIncrement function above. Maybe time for a getIVIncrement function?
>
> Hm, though there appears to be a bug in this copy. The "incr" you identify doesn't appear to be tied to the PN.
`IVInc` is the incoming value of the Phi node from the backedge which has the same phi node as argument thru matcher. That makes it tied, no?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96399/new/
https://reviews.llvm.org/D96399
More information about the llvm-commits
mailing list