Re: [PATCH] PR tree-optimization/95801 - infer non-zero for integral division RHS.

2025-01-23 Thread Richard Biener
On Wed, Jan 22, 2025 at 12:49 AM Andrew MacLeod wrote: > > This patch simply adds an op2_range to operator_div which returns > non-zero if the LHS is not undefined. This means given and integral > division: > > x = y / z > > 'z' will have a range of [-INF, -1] [1, +INF] after execution

[PATCH] PR tree-optimization/95801 - infer non-zero for integral division RHS.

2025-01-21 Thread Andrew MacLeod
This patch simply adds an op2_range to operator_div which returns non-zero if the LHS is not undefined.  This means given and integral division:        x = y / z 'z' will have a range of   [-INF, -1] [1, +INF]  after execution of the statement. This is relatively straightforward and resolve