mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
tree-vect-transform.c (get_initial_def_for_induction): Replace GET_MODE_NUNITS with TYPE_VECTOR_SUBPARTS.
* tree-vect-transform.c (get_initial_def_for_induction): Replace GET_MODE_NUNITS with TYPE_VECTOR_SUBPARTS. (get_initial_def_for_reduction): Likewise. From-SVN: r123034
This commit is contained in:
parent
59111135a8
commit
f58e97341c
@ -1,3 +1,9 @@
|
||||
2007-03-18 Dorit Nuzman <dorit@il.ibm.com>
|
||||
|
||||
* tree-vect-transform.c (get_initial_def_for_induction): Replace
|
||||
GET_MODE_NUNITS with TYPE_VECTOR_SUBPARTS.
|
||||
(get_initial_def_for_reduction): Likewise.
|
||||
|
||||
2007-03-16 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
Fix PR tree-optimization/29922
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-03-18 Dorit Nuzman <dorit@il.ibm.com>
|
||||
|
||||
* gcc.dg/vect/no-tree-dom-vect-bug.c: New test.
|
||||
* gcc.dg/vect/vect.exp: Compile tests with -fno-tree-dominator-opts.
|
||||
|
||||
2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/31120
|
||||
|
30
gcc/testsuite/gcc.dg/vect/no-tree-dom-vect-bug.c
Normal file
30
gcc/testsuite/gcc.dg/vect/no-tree-dom-vect-bug.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* { dg-require-effective-target vect_int } */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "tree-vect.h"
|
||||
|
||||
long stack_vars_sorted[32];
|
||||
|
||||
int
|
||||
main1 (long n)
|
||||
{
|
||||
long si;
|
||||
|
||||
for (si = 0; si < n; ++si)
|
||||
stack_vars_sorted[si] = si;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
long si;
|
||||
|
||||
check_vect ();
|
||||
main1 (32);
|
||||
|
||||
for (si = 0; si < 32; ++si)
|
||||
if (stack_vars_sorted[si] != si)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* { dg-final { cleanup-tree-dump "vect" } } */
|
@ -162,6 +162,12 @@ lappend DEFAULT_VECTCFLAGS "-fno-tree-scev-cprop"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-scev-cprop-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# -fno-tree-dominator-opts
|
||||
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
|
||||
lappend DEFAULT_VECTCFLAGS "-fno-tree-dominator-opts"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-dom-*.\[cS\]]] \
|
||||
"" $DEFAULT_VECTCFLAGS
|
||||
|
||||
# With -Os
|
||||
lappend DEFAULT_VECTCFLAGS "-Os"
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
|
||||
|
@ -531,7 +531,7 @@ get_initial_def_for_induction (tree stmt, tree iv_phi)
|
||||
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
|
||||
tree scalar_type = TREE_TYPE (iv_phi);
|
||||
tree vectype = get_vectype_for_scalar_type (scalar_type);
|
||||
int nunits = GET_MODE_NUNITS (TYPE_MODE (vectype));
|
||||
int nunits = TYPE_VECTOR_SUBPARTS (vectype);
|
||||
edge pe = loop_preheader_edge (loop);
|
||||
basic_block new_bb;
|
||||
block_stmt_iterator bsi;
|
||||
@ -1001,7 +1001,7 @@ get_initial_def_for_reduction (tree stmt, tree init_val, tree *scalar_def)
|
||||
{
|
||||
stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
|
||||
tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
|
||||
int nunits = GET_MODE_NUNITS (TYPE_MODE (vectype));
|
||||
int nunits = TYPE_VECTOR_SUBPARTS (vectype);
|
||||
int nelements;
|
||||
enum tree_code code = TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1));
|
||||
tree type = TREE_TYPE (init_val);
|
||||
|
Loading…
Reference in New Issue
Block a user