Re: [PATCH] PR target/97312: Tweak gcc.target/aarch64/pr90838.c

2020-10-08 Thread Wilco Dijkstra via Gcc-patches
Hi Jakub, >> I think a better way forward would be to make the builtin_clz/ctz more >> defined. >> Having undefined values is a source of unnecessary bugs given practically all >> modern targets return the number of bits for the zero input - it is >> relatively >> easy to ensure this on the few

[PATCH] PR target/97312: Tweak gcc.target/aarch64/pr90838.c

2020-10-08 Thread Wilco Dijkstra via Gcc-patches
Hi Jakub, > Perhaps another way out of this would be document and enforce that > __builtin_c[lt]z{,l,ll} etc calls are undefined at zero, but C[TL]Z ifn > calls are defined there based on *_DEFINED_VALUE_AT_ZERO (*) == 2, and then > we would need to make sure that e.g. in

[PATCH] PR target/97312: Tweak gcc.target/aarch64/pr90838.c

2020-10-08 Thread Wilco Dijkstra via Gcc-patches
Hi, > I am quoting my analysis from the PR. Could an aarch64 expert > pontificate here? > > This test is checking the final assembly for a specific sequence. I > don't speak aarch64 assembly, but the IL is different coming out of evrp. The code currently generated is incorrect - you really

<    1   2