[PATCH] D103656: [ScalarEvolution] Ensure backedge-taken counts are not pointers.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 16:10:25 PDT 2021


efriedma added a comment.

It's the right diff.  The initial version only touched the backedge calculation, but it turned out to be sort of tied together with condition handling because the backedge calculation queries it.  I'll update the description.

> cases where we don't *know* the size of a pointer

There are no such cases.  datalayout has been mandatory for a while.

> Having isKnownPredicate simply return false for a pointer argument which can't be cast is definitely not okay.

The only pointers which can't be cast are non-integral pointers, and other exotic pointers where the index type is not equal to the pointer width.  This doesn't apply to any in-tree target, as far as I know.  I'm not sure why a minor optimization loss for out-of-tree targets is "definitely not okay". (We don't even have any test coverage for this besides the one loop in scev-custom-dl.ll.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103656



More information about the llvm-commits mailing list