[PATCH] D105510: [ScalarEvolution] Strictly enforce pointer/int type rules.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 22:09:44 PDT 2021
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10600
+ if (LHS->getType()->isPointerTy())
+ return false;
----------------
mkazantsev wrote:
> It looks like it filters out such simple case as `(LHS == RHS ) => (RHS== LHS)` (if `LHS = FoundRHS` and `RHS = FoundLHS`). Could you please add a unit test to ensure it's not broken with this patch?
This is inside the `if (getTypeSizeInBits(LHS->getType()) < getTypeSizeInBits(FoundLHS->getType()))`. Since you can't extend/trunc a pointer, this means FoundLHS is not a pointer. I can't see how isImpliedCond could return any useful information in that case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105510/new/
https://reviews.llvm.org/D105510
More information about the llvm-commits
mailing list