Re: [PATCH v4 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-10-08 Thread Jeff Law
On 9/30/24 2:04 AM, Artemiy Volkov wrote: Whenever C1 and C2 are integer constants, X is of a wrapping type, and cmp is a relational operator, the expression X +- C1 cmp C2 can be simplified in the following cases: (a) If cmp is <= and C2 -+ C1 == +INF(1), we can transform the initial compari

[PATCH v4 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-09-30 Thread Artemiy Volkov
Whenever C1 and C2 are integer constants, X is of a wrapping type, and cmp is a relational operator, the expression X +- C1 cmp C2 can be simplified in the following cases: (a) If cmp is <= and C2 -+ C1 == +INF(1), we can transform the initial comparison in the following way: X +- C1 <= C2 -