[SCEV] Canonicalize ext(min/max(x, y)) to min/max(ext(x), ext(y))
I stumbled over this while trying to improve our exit count work. These expressions are equivalent for complementary signed/unsigned ext and min/max (including umin_seq), but they are not canonicalized and SCEV cannot recognize them as the same. The benefit of this canonicalization is that SCEV can prove some new equivalences which it coudln't prove because of different forms. There is 1 test where trip count seems pessimized, I could not directly figure out why, but it just seems an unrelated issue that we can fix. Other changes seem neutral or positive to me. Differential Revision: https://reviews.llvm.org/D141481 Reviewed By: nikic
parent
5e111eb2
Please register or sign in to comment