[SCEV] PtrToInt on non-integral pointers is allowed

As per (committed without review) @reames's rGac81cb7e6dde9b0890ee1780eae94ab96743569b change,
we are now allowed to produce `ptrtoint` for non-integral pointers.
This will unblock further unbreaking of SCEV regarding int-vs-pointer type confusion.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D104322
This commit is contained in:
Roman Lebedev 2021-06-16 10:24:25 +03:00
parent 96cded5b79
commit a3113df219
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 0 additions and 3 deletions

View File

@ -1060,9 +1060,6 @@ const SCEV *ScalarEvolution::getLosslessPtrToIntExpr(const SCEV *Op,
if (!Op->getType()->isPointerTy())
return Op;
assert(!getDataLayout().isNonIntegralPointerType(Op->getType()) &&
"Source pointer type must be integral for ptrtoint!");
// What would be an ID for such a SCEV cast expression?
FoldingSetNodeID ID;
ID.AddInteger(scPtrToInt);