[PATCH] D77211: [LSR] do not replace PHI nodes if its scev is SCEVUnknown
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 19:04:52 PDT 2020
shchenz marked 2 inline comments as done.
shchenz added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolutionExpander.cpp:2040
// If this phi has the same width but is more canonical, replace the
// original with it. As part of the "more canonical" determination,
// respect a prior decision to use an IV chain.
----------------
samparker wrote:
> From your description of the problem, can we just check the incoming values of the phis too?
I think we should not check the incoming value of the phi from loop preheader to decide whether we should eliminate the PHI. SCEV for the phi should be the only factor to do this. Reason why it checks incoming value from loop latch is to eliminate `iv.inc` in loop latch early. Hope I get a right understanding here. Thanks for your comments Sam
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77211/new/
https://reviews.llvm.org/D77211
More information about the llvm-commits
mailing list