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

--- Comment #1 from Edwin Lu <ewlu at rivosinc dot com> ---
>From my tinkering with the code, I've only really been able to bypass the added
check as a potential "solution". For example, something like this essentially
keeps the guaranteed `ltype = vectype` update regardless of misalignment which
seems incorrect to me.

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index f5b3608f6b1..f55871cb411 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -10732,7 +10732,7 @@ vectorizable_load (vec_info *vinfo,
          ltype = build_aligned_type (ltype, TYPE_ALIGN (TREE_TYPE (vectype)));
        }
       /* Load vector(1) scalar_type if it's 1 element-wise vectype.  */
-      else if (nloads == 1)
+      if (nloads == 1)
        ltype = vectype;

       if (slp)

I'm not sure if the problem lies somewhere else so any guidance would be
appreciated

Reply via email to