[PATCH] D98422: [ValueTracking] Handle two PHIs in isKnownNonEqual()
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 11:15:17 PDT 2021
jaykang10 added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2558
+ Query RecQ = Q;
+ RecQ.CxtI = PN1;
+ if (!isKnownNonEqual(IV1, IV2, Depth + 1, RecQ))
----------------
nikic wrote:
> This should be using `IncomBB->getTerminator()` as the context, not the phi node itself.
Ah... sorry. I will update it.
================
Comment at: llvm/test/Analysis/ValueTracking/monotonic-phi.ll:305
+ ret i1 %cmp
+}
----------------
nikic wrote:
> We should also have a negative test for the case where the start value is the same (e.g. 2, 2 instead of 2. 3).
>
> known-non-equal.ll might be a better fit for these tests.
Yep, I will update it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98422/new/
https://reviews.llvm.org/D98422
More information about the llvm-commits
mailing list