This enhancement will enable loop vectorizations that are currently blocked due to noop inttoptr/ptrtoint operations.
The change itself is straightforward, but it exposes a few bugs in existing code. For instance, const_expr created by the expander can grow exponentially so some size limit needs to be applied. The expander also invalidates some of the SCEVs for some of the values (when noop cast is inserted) which can leads to inconsistent SCEVs with other cached values when recomputed (e.g, when scalar loop's header phi's init value is replaced by loop vectorizer). This patch also fixes those problems.