https://gcc.gnu.org/g:dab845bbb29b68bf7e1b6127896fe834fea1b3a4

commit dab845bbb29b68bf7e1b6127896fe834fea1b3a4
Author: Alexandre Oliva <ol...@gnu.org>
Date:   Fri Nov 22 19:16:58 2024 -0300

    ifcombine: don't try xor on right-hand op

Diff:
---
 gcc/gimple-fold.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 731f6ccd5597..d0caabd8a4b4 100644
--- a/gcc/gimple-fold.cc
+++ b/gcc/gimple-fold.cc
@@ -7486,6 +7486,10 @@ decode_field_reference (tree *pexp, HOST_WIDE_INT 
*pbitsize,
          exp = res_ops[1];
          gcc_checking_assert (!xor_cmp_op);
        }
+      else if (!xor_cmp_op)
+       /* Not much we can do when xor appears in the right-hand compare
+          operand.  */
+       return NULL_TREE;
       else
        {
          *xor_p = true;

Reply via email to