[PATCH] D68328: Fix occurrences that size and range of pointers are assumed to be the same.

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 00:10:32 PST 2019


delena added a comment.

Currently we keep Pointer SCEV type as Index type because we don't have any special SCEV Expression type for pointers. 
I suppose, we should add scAddPtrExpr (add index to pointer) and scPtrDiffExpr (pointers diff) to solve this problem. The scAddPtrExpr  will always return PonterSizeType and will be expanded to GEP, not to "add". The scPtrDiffExpr will return IndexSizeType and will be expanded to trunc+sub.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D68328





More information about the llvm-commits mailing list