[PATCH] D38494: [ScalarEvolution] Handling for ICmp occuring in the evolution chain.
Jatin Bhateja via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 02:26:29 PDT 2017
jbhateja added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:4995
+ // If compare instruction is same or inverse of the compare in the
+ // branch of the loop latch, then return a constant evolution
+ // node. This shall facilitate computations of loop exit counts
----------------
sanjoy wrote:
> I don't think this is correct in the last iteration of the loop when the latch will not be taken.
This routine is not directly evaluating any condition, in fact its returing a true or false value for comparision, client of SCEV is going to perform further analysis based on it. Can you help in to identify a test scenario where client using this will generate incorrect result, I see you have explored this area well in past.
https://reviews.llvm.org/D38494
More information about the llvm-commits
mailing list