[LFTR] Use SCEVExpander for the pointer limit case instead of manual IR gen
authorPhilip Reames <listmail@philipreames.com>
Wed, 3 Jul 2019 20:03:46 +0000 (20:03 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 3 Jul 2019 20:03:46 +0000 (20:03 +0000)
commitea06d63c35645e149d601a34bdad0b43c4522d0f
tree9f7a9084eabb3b90b50fc9c91cface6604ee0b12
parentf1807a7df6b31f4b774bfc6ad207fee5d8d32b99
[LFTR] Use SCEVExpander for the pointer limit case instead of manual IR gen

As noted in the test change, this is not trivially NFC, but all of the changes in output are cases where the SCEVExpander form is more canonical/optimal than the hand generation.

llvm-svn: 365075
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
llvm/test/Transforms/IndVarSimplify/lftr-address-space-pointers.ll
llvm/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll
llvm/test/Transforms/IndVarSimplify/lftr-pr41998.ll
llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll