From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17612 invoked by alias); 23 Dec 2013 10:57:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17573 invoked by uid 48); 23 Dec 2013 10:57:00 -0000 From: "bmei at broadcom dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59569] [4.9 Regression] r206148 causes internal compiler error: in vect_create_destination_var, at tree-vect-data-refs.c:4294 Date: Mon, 23 Dec 2013 10:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bmei at broadcom dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg02045.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59569 --- Comment #9 from Bingfeng Mei --- 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