Re: [PATCH] Improved handling of MINUS_EXPR in bit CCP.

2021-08-17 Thread Richard Biener via Gcc-patches
On Thu, Aug 12, 2021 at 11:52 AM Roger Sayle wrote: > > > This patch improves the bit bounds for MINUS_EXPR during tree-ssa's > conditional constant propagation (CCP) pass (and as an added bonus > adds support for POINTER_DIFF_EXPR). > > The pessimistic assumptions made by the current algorithm ar

[PATCH] Improved handling of MINUS_EXPR in bit CCP.

2021-08-12 Thread Roger Sayle
This patch improves the bit bounds for MINUS_EXPR during tree-ssa's conditional constant propagation (CCP) pass (and as an added bonus adds support for POINTER_DIFF_EXPR). The pessimistic assumptions made by the current algorithm are demonstrated by considering 1 - (x&1). Intuitively this should