https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123267

--- Comment #11 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #10)
> ```
> diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc
> index 802c5e99afc..9a28eb1cb44 100644
> --- a/gcc/ifcvt.cc
> +++ b/gcc/ifcvt.cc
> @@ -3193,8 +3193,8 @@ noce_try_cond_zero_arith (struct noce_if_info *if_info)
>    /* AND requires !cond, instead we swap ops around.  */
>    target = noce_emit_cmove (if_info, target, GET_CODE (if_info->cond),
>                             XEXP (if_info->cond, 0), XEXP (if_info->cond, 1),
> -                           op != AND ? a_op1 : const0_rtx,
> -                           op != AND ? const0_rtx : a_op0);
> +                           op != AND ? XEXP (a, 1) : const0_rtx,
> +                           op != AND ? const0_rtx : XEXP (a, 0));
>    if (!target)
>      goto end_seq_n_fail;
> 
> ```
> 
> This fixes it by using the original a_op0/a_op1.
> The fix is also obvious.
> So I will apply it once testing is finished.

Thanks for the fix pinskia. LGTM.

Reply via email to