tree-vect-patterns.c (vect_recog_widen_mult_pattern): Check that vectype is not NULL.

* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Check that 
	vectype is not NULL.
	(vect_pattern_recog_1): Likewise.

From-SVN: r121640
This commit is contained in:
Ira Rosen 2007-02-06 08:41:01 +00:00 committed by Ira Rosen
parent 8fbbe90b26
commit 03d3e95382
4 changed files with 48 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-02-06 Ira Rosen <irar@il.ibm.com>
* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Check that
vectype is not NULL.
(vect_pattern_recog_1): Likewise.
2007-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fold-const.c (negate_expr_p): Handle CONJ_EXPR.

View File

@ -1,3 +1,7 @@
2007-02-06 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/fast-math-vect-pow-2.c: New test.
2007-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/builtins-20.c: Add more cases.

View File

@ -0,0 +1,33 @@
/* { dg-do compile } */
typedef double d_type;
struct
{
d_type x;
d_type y;
} S[100];
#define N 16
d_type foo (d_type t);
d_type
main1 ()
{
int i;
d_type t;
for (i = 0; i < N; i++)
{
t = (d_type) i / (d_type) 10;
S[5].x = t * t;
}
return S[5].x;
}
int
main (void)
{
d_type tmp = main1 ();
}
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -386,7 +386,8 @@ vect_recog_widen_mult_pattern (tree last_stmt,
/* Check target support */
vectype = get_vectype_for_scalar_type (half_type0);
if (!supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt, vectype,
if (!vectype
|| !supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt, vectype,
&dummy, &dummy, &dummy_code,
&dummy_code))
return NULL;
@ -647,6 +648,9 @@ vect_pattern_recog_1 (
/* Check target support */
pattern_vectype = get_vectype_for_scalar_type (type_in);
if (!pattern_vectype)
return;
optab = optab_for_tree_code (TREE_CODE (pattern_expr), pattern_vectype);
vec_mode = TYPE_MODE (pattern_vectype);
if (!optab