Commit 32ff1243 by Dorit Nuzman Committed by Dorit Nuzman

tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an additional argument.

2008-08-14  Dorit Nuzman  <dorit@il.ibm.com>

        * tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an
        additional argument. Support reduction when duplication is needed due
        to data-types of different sizes in the loop.
        (get_initial_def_for_induction): Fix printout.
        (vect_get_vec_def_for_stmt_copy): Support case where the
        vec_stmt_for_operand is a phi node.
        (vectorizable_reduction): Support reduction when duplication is needed
        due to data-types of different sizes in the loop.
        (vectorizable_call): Remove restriction to not vectorize in case we
        have data-types of different sizes in the loop.
        (vectorizable_conversion): Likewise.
        (vectorizable_operation): Likewise.
        (vectorizable_type_demotion): Likewise.
        (vectorizable_type_promotion): Likewise.
        (vectorizable_induction): Add restriction to not vectorize in case
        we have data-types of different sizes in the loop.

From-SVN: r139096
parent ed6fa129
2008-08-14 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vect_create_epilog_for_reduction): Takes an
additional argument. Support reduction when duplication is needed due
to data-types of different sizes in the loop.
(get_initial_def_for_induction): Fix printout.
(vect_get_vec_def_for_stmt_copy): Support case where the
vec_stmt_for_operand is a phi node.
(vectorizable_reduction): Support reduction when duplication is needed
due to data-types of different sizes in the loop.
(vectorizable_call): Remove restriction to not vectorize in case we
have data-types of different sizes in the loop.
(vectorizable_conversion): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_type_demotion): Likewise.
(vectorizable_type_promotion): Likewise.
(vectorizable_induction): Add restriction to not vectorize in case
we have data-types of different sizes in the loop.
2008-08-14 Christophe Saout <christophe@saout.de>
Uros Bizjak <ubizjak@gmail.com>
......
2008-08-14 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/vect-outer-4g.c: Change loop bound.
* gcc.dg/vect/vect-outer-4k.c: Likewise.
* gcc.dg/vect/vect-outer-4l.c: Likewise.
* gcc.dg/vect/vect-outer-4f.c: Likewise.
* gcc.dg/vect/vect-outer-4a.c: Vectorizable. Remove obsolete comment.
* gcc.dg/vect/vect-outer-4i.c: Likewise.
* gcc.dg/vect/vect-outer-4b.c: Likewise.
* gcc.dg/vect/vect-outer-4j.c: Likewise.
2008-08-14 Uros Bizjak <ubizjak@gmail.com>
PR target/37101
......
......@@ -6,8 +6,7 @@ signed short in[N+M];
signed short coeff[M];
signed short out[N];
/* Outer-loop vectorization.
Currently not vectorized because of multiple-data-types in the inner-loop. */
/* Outer-loop vectorization. */
void
foo (){
......@@ -23,9 +22,5 @@ foo (){
}
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
/* FORNOW. not vectorized until we support 0-stride acceses like coeff[j]. should be:
{ scan-tree-dump-not "multiple types in nested loop." "vect" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target { vect_widen_mult_hi_to_si && vect_pack_trunc } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -6,8 +6,7 @@ signed short in[N+M];
signed short coeff[M];
int out[N];
/* Outer-loop vectorization.
Currently not vectorized because of multiple-data-types in the inner-loop. */
/* Outer-loop vectorization. */
void
foo (){
......@@ -23,9 +22,5 @@ foo (){
}
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
/* FORNOW. not vectorized until we support 0-stride acceses like coeff[j]. should be:
{ scan-tree-dump-not "multiple types in nested loop." "vect" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -2,7 +2,7 @@
#include <stdarg.h>
#include "tree-vect.h"
#define N 40
#define N 96
#define M 128
unsigned short in[N+M];
unsigned int out[N];
......
......@@ -2,7 +2,7 @@
#include <stdarg.h>
#include "tree-vect.h"
#define N 40
#define N 96
#define M 128
unsigned short in[N+M];
unsigned int out[N];
......
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
#define N 40
#include <stdarg.h>
#include "tree-vect.h"
#define N 96
#define M 128
unsigned char in[N+M];
unsigned short out[N];
/* Outer-loop vectorization. */
/* Not vectorized due to multiple-types in the inner-loop. */
/* Multiple-types in the inner-loop. */
__attribute__ ((noinline))
unsigned short
foo (){
int i,j;
......@@ -24,5 +28,22 @@ foo (){
return s;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
int main (void)
{
check_vect ();
int i;
unsigned short s;
for (i = 0; i < N+M; i++)
in[i] = (unsigned char)i;
s = foo ();
if (s != 34048)
abort ();
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target vect_unpack } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
#define N 40
#define N 96
#define M 128
unsigned char in[N+M];
unsigned short out[N];
/* Outer-loop vectorization. */
/* Not vectorized due to multiple-types in the inner-loop. */
void
foo (){
......@@ -22,5 +21,5 @@ foo (){
}
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target vect_unpack } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -2,7 +2,7 @@
#include <stdarg.h>
#include "tree-vect.h"
#define N 40
#define N 96
#define M 128
unsigned short in[N+M];
unsigned int out[N];
......
......@@ -2,7 +2,7 @@
#include <stdarg.h>
#include "tree-vect.h"
#define N 40
#define N 96
#define M 128
unsigned short in[N+M];
unsigned int out[N];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment