[PATCH] D114555: [ScalarEvolution] Add bailout to avoid zext of pointer.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 00:13:42 PST 2021


efriedma added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10789
 
-    if (LHS->getType()->isPointerTy())
+    if (LHS->getType()->isPointerTy() || RHS->getType()->isPointerTy())
       return false;
----------------
fhahn wrote:
> can this be moved up before `if (!CmpInst::isSigned(FoundPred)....` and the pointer check dropped from the condition above?
This check is checking FoundLHS/FoundRHS; the `if (!CmpInst::isSigned(FoundPred)....` check is checking LHS/RHS.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114555



More information about the llvm-commits mailing list