Re: [PATCH] ifcombine field merge: handle bitfield zero tests in range tests

2024-12-17 Thread Richard Biener
> Am 18.12.2024 um 03:19 schrieb Alexandre Oliva : > >  > Some bitfield compares with zero are optimized to range tests, so > instead of X & ~(Bit - 1) != 0 what reaches ifcombine is X > (Bit - 1), > where Bit is a power of two and X is unsigned. > > This patch recognizes this optimized form

[PATCH] ifcombine field merge: handle bitfield zero tests in range tests

2024-12-17 Thread Alexandre Oliva
Some bitfield compares with zero are optimized to range tests, so instead of X & ~(Bit - 1) != 0 what reaches ifcombine is X > (Bit - 1), where Bit is a power of two and X is unsigned. This patch recognizes this optimized form of masked compares, and attempts to merge them like masked compares,