[PATCH] D89540: [SCEV] Index type usually is, but is not guaranteed to be, equal to the pointer bit width

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 09:45:00 PDT 2020


efriedma added reviewers: theraven, delena, Ayal.
efriedma added a comment.

I'm not sure I completely understand the history from https://reviews.llvm.org/D42123.  But I think the idea is that for pointer-type SCEVs, we want to do SCEV arithmetic using the index type because the other bits aren't relevant: from my understanding, they don't participate in pointer arithmetic.

So I think the right solution is to leave this code alone.  And maybe don't create SCEVPtrToInt expressions for ptrtoint operations on pointers where getIndexTypeSizeInBits() isn't equal to getTypeSizeInBits(), at least initially, since it's sort of tricky to reason about.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89540



More information about the llvm-commits mailing list