[PATCH] ARM cmpsi2_addneg fixes (PR target/89506)
Jakub Jelinek
jakub@redhat.com
Fri Mar 1 16:18:00 GMT 2019
On Fri, Mar 01, 2019 at 05:04:24PM +0100, Jakub Jelinek wrote:
> + /* For 0 and INT_MIN it is essential that we use subs, as adds
> + will result in different condition codes (like cmn rather than
> + like cmp). Both alternatives can match also for -1/1 with
> + TARGET_THUMB2, prefer instruction with #1 in that case as it
> + is shorter. */
> + if (which_alternative == 0 && operands[1] != const1_rtx)
^^^ operands[3] != const1_rtx
or operands[2] != constm1_rtx.
Sorry.
> + return "subs%?\\t%0, %1, #%n3";
> + else
> + return "adds%?\\t%0, %1, %3";
> +}
> [(set_attr "conds" "set")
> (set_attr "type" "alus_sreg")]
> )
Jakub
More information about the Gcc-patches
mailing list