On Mon, Nov 25, 2024 at 12:10 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Mon, Nov 25, 2024 at 11:52:31AM +0100, Uros Bizjak wrote: > > > Any reason for an exact comparison rather than > > > && (INTVAL (operands[3]) & (<MODE_SIZE> * BITS_PER_UNIT - 1)) == 0 > > > ? > > > I mean, we can optimize this way 1U << (32 - x) or > > > 1U << (1504 - x) or any other multiply of 32. > > > > Count values outside of [0, bitwidth) are undefined in general. Also, > > Sure, e.g. the 1504 - x case will be undefined if x is not in [1473, 1504] > But it very well could be in that range. > > What I'm arguing about is that changing the test (in all the new patterns) > will not noticeably slow compilation down and be more general.
No problem, I'll add the above test generalization in a follow-up patch. Uros.