On Nov 22, 2024, Alexandre Oliva <ol...@adacore.com> wrote:

> - Rework BIT_XOR handling to avoid having to match patterns again.

I goofed here, and only an -O3 profiling bootstrap of gcc-14 caught it.
Please consider this incremental patchlet as if included as part of the
previous one.  Bootstrapped on top of the other on x86_64-linux-gnu.

diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 731f6ccd5597e..d0caabd8a4b4d 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;


-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

Reply via email to