From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21755 invoked by alias); 3 May 2010 11:17:13 -0000 Received: (qmail 21631 invoked by alias); 3 May 2010 11:16:52 -0000 Date: Mon, 03 May 2010 11:17:00 -0000 Message-ID: <20100503111652.21630.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/43901] [4.6 Regression] FAIL: gcc.c-torture/compile/pr42196-2.c In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" 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 X-SW-Source: 2010-05/txt/msg00175.txt.bz2 ------- Comment #11 from rguenther at suse dot de 2010-05-03 11:16 ------- Subject: Re: [4.6 Regression] FAIL: gcc.c-torture/compile/pr42196-2.c On Sun, 2 May 2010, irar at il dot ibm dot com wrote: > ------- Comment #10 from irar at il dot ibm dot com 2010-05-02 12:12 ------- > Looks like it's caused by: > r158157 | rguenth | 2010-04-09 13:40:14 +0300 (Fri, 09 Apr 2010) | 28 lines > > The problem is in getting vectype for f1_2: > > foo (int b, double f1, double f2, int c1, int c2) > { > ... > float D.1999; > float D.1998; > ... > > : > D.1998_3 = (float) f1_2(D); > REALPART_EXPR = D.1998_3; > D.1999_5 = (float) f2_4(D); > IMAGPART_EXPR = D.1999_5; > D.2012_10 = u.ci; > goto ; > > An immediate fix would be to replace the assert in > > /* If op0 is an external or constant def use a vector type with > the same size as the output vector type. */ > if (!vectype) > vectype = get_same_sized_vectype (TREE_TYPE (op0), vectype_out); > gcc_assert (vectype); > > with 'return false', since get_same_sized_vectype currently just redirects to > get_vectype_for_scalar_type. But the comment (and the future intent) seems > incorrect for external defs, as f1 and f2 in this test. Well. For loops we'd have disqualified it as there is no vector type for the external def (well, the stmt inside the loop). So we do not do this for SLP? In that case yes, if we can return false at this point then we should replace this (and similar) asserts with return false. Or we should fix the code that scans the BB initially and sets vector types properly? Thanks, Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43901