[PATCH] D98422: [Alias] Add a ah-hoc pattern with two PHI for isKnownNonEqual

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 16:07:13 PDT 2021


jaykang10 added a comment.

I think we could check the IV of loop roughly as below.

   if (Q.DT != nullptr && Q.DT->dominates(PN1->getParent(), Pred)) {
     const SCEV *IVSCEV = nullptr;
     if (PN1 == IV2) 
       IVSCEV = SE.getSCEV(IV2);
     else if (PN2 == IV1) {
       IVSCEV = SE.getSCEV(IV1);
  
     if (isa<SCEVAddRecExpr>(IVSCEV))
       continue;
  }

In this case, we could say the IV is not same among iterations... but it needs ScalarEvolution... @nikic @reames How do you think about it? I wonder whether it is acceptable to add ScalarEvolution to BasicAA and ValueTracking or not...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98422/new/

https://reviews.llvm.org/D98422



More information about the llvm-commits mailing list