[SCEV] SCEVPtrToIntExpr simplifications
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 30 Oct 2020 06:12:49 +0000 (09:12 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 30 Oct 2020 08:13:35 +0000 (11:13 +0300)
commitb4916918e5219ac25a5b6472c5638450f867d975
tree425967c47ccb446e55af76a190c549f0c4760e06
parent81fc53a36a4e3ca5cc9d5bc9b3ea32f304e35b93
[SCEV] SCEVPtrToIntExpr simplifications

If we've got an SCEVPtrToIntExpr(op), where op is not an SCEVUnknown,
we want to sink the SCEVPtrToIntExpr into an operand,
so that the operation is performed on integers,
and eventually we end up with just an `SCEVPtrToIntExpr(SCEVUnknown)`.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D89692
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/ptrtoint.ll
llvm/test/Transforms/LoopStrengthReduce/X86/expander-crashes.ll
polly/test/ScopInfo/int2ptr_ptr2int.ll
polly/test/ScopInfo/int2ptr_ptr2int_2.ll