[LFTR] Simplify integer case for genLoopLimit [nfc-ish]
authorPhilip Reames <preames@rivosinc.com>
Wed, 22 Mar 2023 19:07:08 +0000 (12:07 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 22 Mar 2023 19:22:05 +0000 (12:22 -0700)
commit0766c1bd5c0ece916be14b620b02bea845cb9fac
treee6fadd4c0437f9f35592f2fd5fdb45b6d3b3572e
parente655d8a54880cf550567dda0e9a1a33f6ee98df5
[LFTR] Simplify integer case for genLoopLimit [nfc-ish]

The integer case in genLoopLimit reduces down to a special case for narrowing the bitwidth of the limit, and then performing the same expansion we would for a pointer IV.

Differential Revision: https://reviews.llvm.org/D146638
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp