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

--- Comment #6 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Hmm now me the easiest way is just not to run
vect_look_through_possible_promotion:

diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
index 45fcec40a28..533f4816270 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -1407,7 +1407,7 @@ vect_recog_sad_pattern (vec_info *vinfo,
       tree abd_oprnd0 = gimple_call_arg (abd_stmt, 0);
       tree abd_oprnd1 = gimple_call_arg (abd_stmt, 1);

-      if (gimple_call_internal_fn (abd_stmt) == IFN_ABD)
+      if (gimple_call_internal_fn (abd_stmt) == IFN_ABD/*)
        {
          if (!vect_look_through_possible_promotion (vinfo, abd_oprnd0,
                                                     &unprom[0])
@@ -1416,7 +1416,7 @@ vect_recog_sad_pattern (vec_info *vinfo,
            return NULL;
          abd_optype = TREE_TYPE (abd_oprnd0);
        }
-      else if (gimple_call_internal_fn (abd_stmt) == IFN_VEC_WIDEN_ABD)
+      else if (*/|| gimple_call_internal_fn (abd_stmt) == IFN_VEC_WIDEN_ABD)
        {
          unprom[0].op = abd_oprnd0;
          unprom[0].type = TREE_TYPE (abd_oprnd0);

I cannot see any bad effect from this.  I'll bootstrap it.

Reply via email to