https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123267
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
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.