From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28273 invoked by alias); 28 Jan 2015 14:21:17 -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 28211 invoked by uid 48); 28 Jan 2015 14:21:11 -0000 From: "ktkachov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64829] [ARM] ICE at -O3 in vect_get_vec_def_for_stmt_copy Date: Wed, 28 Jan 2015 14:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ktkachov at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: 2015-01/txt/msg03244.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64829 --- Comment #7 from ktkachov at gcc dot gnu.org --- > > Index: gcc/tree-vect-patterns.c > =================================================================== > --- gcc/tree-vect-patterns.c (revision 220205) > +++ gcc/tree-vect-patterns.c (working copy) > @@ -1732,9 +1732,11 @@ vect_recog_widen_shift_pattern (vec if (TREE_CODE (oprnd0) != SSA_NAME || TREE_CODE (oprnd1) != INTEGER_CST) > return NULL; > > - /* Check operand 0: it has to be defined by a type promotion. */ > - if (!type_conversion_p (oprnd0, last_stmt, false, &half_type0, &def_stmt0, > - &promotion) > + /* Check operand 0: it has to be defined by a type promotion and it > + should be only used by the shift. */ > + if (!has_single_use (oprnd0) > + || !type_conversion_p (oprnd0, last_stmt, false, &half_type0, > &def_stmt0, > + &promotion) > || !promotion) > return NULL; That fixes the ICE in the testcase for me. I'll give it a test on arm-none-eabi and an arm bootstrap