This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/43901] [4.6 Regression] FAIL: gcc.c-torture/compile/pr42196-2.c



------- 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;
> ...
> 
> <bb 3>:
>   D.1998_3 = (float) f1_2(D);
>   REALPART_EXPR <u.cf> = D.1998_3;
>   D.1999_5 = (float) f2_4(D);
>   IMAGPART_EXPR <u.cf> = D.1999_5;
>   D.2012_10 = u.ci;
>   goto <bb 5>;
> 
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]