https://gcc.gnu.org/g:be442be963ba54e8deba7613a215a77daa7eb006
commit be442be963ba54e8deba7613a215a77daa7eb006 Author: Alexandre Oliva <ol...@gnu.org> Date: Thu Nov 28 18:44:35 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 6ac7f1593ad3..cb560ba456ba 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -7485,6 +7485,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;