Re: [PATCH 7/8] middle-end: Add c[lt]z idiom recognition

2022-11-14 Thread Richard Biener via Gcc-patches
On Fri, Nov 11, 2022 at 8:06 PM Andrew Carlotti via Gcc-patches wrote: > > This recognises the patterns of the form: > while (n & 1) { n >>= 1 } > > Unfortunately there are currently two issues relating to this patch. > > Firstly, simplify_using_initial_conditions does not recognise that >

[PATCH 7/8] middle-end: Add c[lt]z idiom recognition

2022-11-11 Thread Andrew Carlotti via Gcc-patches
This recognises the patterns of the form: while (n & 1) { n >>= 1 } Unfortunately there are currently two issues relating to this patch. Firstly, simplify_using_initial_conditions does not recognise that (n != 0) and ((n & 1) == 0) implies that ((n >> 1) != 0). This preconditions arise