This reverts commit cb905605b2e95f88296afe136b21a7d2476cb058. Recommit the patch with a small change to check the destination type matches the address type, to avoid a crash on mismatch. Original message: This patch updates tryToReuseLCSSAPhi to use SCEVPtrToAddr, unless using SCEVPtrToInt allows re-use, because the IR already contains a re-usable phi using PtrToInt. This is a first step towards migrating to SCEVPtrToAddr and avoids regressions in follow-up changes. PR: https://github.com/llvm/llvm-project/pull/178727