gcc/
authorbelagod <belagod@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Oct 2010 16:07:21 +0000 (16:07 +0000)
committerbelagod <belagod@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Oct 2010 16:07:21 +0000 (16:07 +0000)
2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>

* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Add NULL
check for vectype_out returned by get_vectype_for_scalar_type().

testsuite/

2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>

* gcc.dg/vect/pr45847.c: New test.

git-svn-id: svn://gcc.gnu.org/svn/gcc/trunk@165123 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr45847.c [new file with mode: 0644]
gcc/tree-vect-patterns.c

index d088f60..017b196 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>
+
+       * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Add NULL
+       check for vectype_out returned by get_vectype_for_scalar_type().
+
 2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>
 
        * config/arm/neon.md (neon_unpack<US>_<mode>): Add 'w' to
 2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>
 
        * config/arm/neon.md (neon_unpack<US>_<mode>): Add 'w' to
index c78a2f3..1a3380e 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-07  Tejas Belagod  <tejas.belagod@arm.com>
+
+       * gcc.dg/vect/pr45847.c: New test.
+
 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
            Kai Tietz  <kai.tietz@onevision.com>
 
 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
            Kai Tietz  <kai.tietz@onevision.com>
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr45847.c b/gcc/testsuite/gcc.dg/vect/pr45847.c
new file mode 100644 (file)
index 0000000..f34caa1
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+
+long long foo (long long *__restrict a,  int *__restrict b, int *__restrict c )
+{
+  int i;
+  long long sum=0;
+  for (i=0;i<256;i++)
+   sum += (long long)b[i] * c[i];
+
+  return sum;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
index 0d5824c..ebe00d6 100644 (file)
@@ -413,6 +413,7 @@ vect_recog_widen_mult_pattern (gimple last_stmt,
   vectype = get_vectype_for_scalar_type (half_type0);
   vectype_out = get_vectype_for_scalar_type (type);
   if (!vectype
   vectype = get_vectype_for_scalar_type (half_type0);
   vectype_out = get_vectype_for_scalar_type (type);
   if (!vectype
+      || !vectype_out
       || !supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt,
                                          vectype_out, vectype,
                                          &dummy, &dummy, &dummy_code,
       || !supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt,
                                          vectype_out, vectype,
                                          &dummy, &dummy, &dummy_code,