[SCEV] Common code for computing trip count in a fixed type [NFC-ish]
authorPhilip Reames <preames@rivosinc.com>
Tue, 25 Apr 2023 18:57:46 +0000 (11:57 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 25 Apr 2023 19:04:42 +0000 (12:04 -0700)
commit09d879d060ed31b22a6e72f7f5e44fe9b5660aa3
tree968e2eb15e8cfef899616637ac516c701108da19
parent88c618cc414b6a4d0f961825bf029d8266a37254
[SCEV] Common code for computing trip count in a fixed type [NFC-ish]

This is a follow on to D147117 and D147355. In both cases, we were adding special cases to compute zext(BTC+1) instead of zext(BTC)+1 when the BTC+1 computation was known not to overflow.

Differential Revision: https://reviews.llvm.org/D148661
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Transforms/Scalar/LoopFlatten.cpp
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp