Patchwork vect pat recog fails in sbitmap.c on ia64

login
register
mail settings
Submitter Alexandre Oliva
Date June 15, 2010, 12:16 p.m.
Message ID <or7hm0lcdb.fsf@livre.localdomain>
Download mbox | patch
Permalink /patch/55644/
State New
Headers show

Comments

Alexandre Oliva - June 15, 2010, 12:16 p.m.
On Jun 11, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Fri, Jun 11, 2010 at 9:25 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> A -O3 bootstrap on ia64-linux-gnu crashes building sbitmap.c in stage2.
>> The problem is that get_vectype_for_scalar_type (type_out = <unsigned
>> long int>) returns type_out = NULL, and then vect_pattern_recog_1
>> crashes when it attempts to take the mode of the returned type.

> You should instead bail out immediately.

> Ok with that change.

Thanks, here's what I'm checking in.

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree-vect-patterns.c (vect_pattern_recog_1): Bail out if we
	don't get a vector type for output.

Index: gcc/tree-vect-patterns.c
===================================================================
--- gcc/tree-vect-patterns.c.orig	2010-06-14 16:08:23.000000000 -0300
+++ gcc/tree-vect-patterns.c	2010-06-14 16:25:04.000000000 -0300
@@ -699,6 +699,8 @@  vect_pattern_recog_1 (
 	type_out = get_vectype_for_scalar_type (type_out);
       else
 	type_out = type_in;
+      if (!type_out)
+	return;
       pattern_vectype = type_out;
 
       if (is_gimple_assign (pattern_stmt))