On 6/3/23 17:03, Andrew Pinski via Gcc-patches wrote:
On Sat, Jun 3, 2023 at 3:53 PM Takayuki 'January June' Suwa via
Gcc-patches <gcc-patches@gcc.gnu.org> wrote:

This patch optimizes both the boolean evaluation of and the branching of
EQ/NE against INT_MIN (-2147483648), by taking advantage of the specifi-
cation the ABS machine instruction on Xtensa returns INT_MIN iff INT_MIN,
otherwise non-negative value.

I wonder if this should be a generic expand improvement here.
You would definitely need to expand both ways and see if one is cost
more than the other.
There's probably some targets where this would be beneficial. Especially those with branch-on-bit capabilities.

Jeff

Reply via email to