On 12/28/2025 7:26 PM, Andrew Pinski wrote:
Like r16-6332-g2a84a753afcf37 but instead of just allowing any comparisons
against 0, this allows all comparisons. I mentioned this in
https://gcc.gnu.org/pipermail/gcc-patches/2025-December/704463.html.
gcc/ChangeLog:
* ifcvt.cc (noce_try_cond_zero_arith): Remove restriction on comparison
against 0.
It looks like we expand via "emit_conditional_move", which is good. When
this code was first written the RISC-v expansion code didn't do any
canonicalization and would reject anything other than an equality
comparison of a register against 0. That was fixed a year or so ago and
we'll expand things in the (mostly) expected ways, including emitting
the comparison if necessary.
OK for the trunk. Thanks.
Jeff