Commit 602fea7c by Dorit Nuzman Committed by Dorit Nuzman

re PR tree-optimization/30795 (ice for legal code with -ftree-vectorize -O2)

        PR tree-optimization/30975
        * tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove
        wrong assert.

From-SVN: r122127
parent 5646ba12
2007-02-19 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/30975
* tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove
wrong assert.
2007-02-18 Eric Christopher <echristo@gmail.com>
* mips.c (mips_prepare_builtin_arg): Add argnum parameter.
......
2007-02-18 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/30975
* gcc.dg/vect/vect-iv-8.c: Fix to include an induction. Xfail.
* gcc.dg/vect/vect-iv-8a.c: New (same as above, but signed).
* gcc.dg/vect/pr30795.c: New.
2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/30681
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
char bigDone[260];
int runningOrder[260];
int
main()
{
int i;
for (i = 0; i <= 255; i++) {
bigDone [i] = ((char)0);
runningOrder[i] = i;
}
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -10,6 +10,7 @@ int main1 (short X)
unsigned char a[N];
unsigned short b[N];
unsigned int c[N];
short myX = X;
int i;
/* vectorization of induction with type conversions. */
......@@ -18,12 +19,13 @@ int main1 (short X)
a[i] = (unsigned char)X;
b[i] = X;
c[i] = (unsigned int)X;
X++;
}
/* check results: */
for (i = 0; i < N; i++)
{
if (a[i] != (char)X || b[i] != X || c[i] != (int)X)
if (a[i] != (unsigned char)myX || b[i] != myX || c[i] != (unsigned int)myX++)
abort ();
}
......@@ -37,5 +39,9 @@ int main (void)
return main1 (3);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
/* Fails to get vectorized due to a redundant cast. Once this is fixed,
should be vectorized as follows:
dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } }
*/
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 26
int main1 (short X)
{
signed char a[N];
short b[N];
int c[N];
short myX = X;
int i;
/* vectorization of induction with type conversions. */
for (i = 0; i < N; i++)
{
a[i] = (signed char)X;
b[i] = X;
c[i] = (int)X;
X++;
}
/* check results: */
for (i = 0; i < N; i++)
{
if (a[i] != (signed char)myX || b[i] != myX || c[i] != (int)myX++)
abort ();
}
return 0;
}
int main (void)
{
check_vect ();
return main1 (3);
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -897,8 +897,6 @@ vect_get_vec_def_for_stmt_copy (enum vect_def_type dt, tree vec_oprnd)
vec_stmt_for_operand = SSA_NAME_DEF_STMT (vec_oprnd);
def_stmt_info = vinfo_for_stmt (vec_stmt_for_operand);
if (dt == vect_induction_def)
gcc_assert (TREE_CODE (vec_stmt_for_operand) == PHI_NODE);
gcc_assert (def_stmt_info);
vec_stmt_for_operand = STMT_VINFO_RELATED_STMT (def_stmt_info);
gcc_assert (vec_stmt_for_operand);
......
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