http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59569

--- Comment #9 from Bingfeng Mei <bmei at broadcom dot com> ---
Seems simple patch is to just bypass permutation for constant operand as
vec_oprnd is a constant vector with identical elements.

Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c   (revision 206176)
+++ tree-vect-stmts.c   (working copy)
@@ -5353,7 +5353,8 @@ vectorizable_store (gimple stmt, gimple_
                set_ptr_info_alignment (get_ptr_info (dataref_ptr), align,
                                        misalign);

-             if (negative)
+             if (negative
+                 && !CONSTANT_CLASS_P (gimple_assign_rhs1 (stmt)))
                {
                  tree perm_mask = perm_mask_for_reverse (vectype);
                  tree perm_dest

Reply via email to