[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:
parent
96cded5b79
commit
a3113df219
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue