re PR tree-optimization/18607 (Vectorizer: data_reference is overwritten in vect_analyze_data_refs)
2004-11-30 Ira Rosen <irar@il.ibm.com> PR tree-opt/18607 * tree-vectorizer.c (vect_analyze_data_refs): Use temporary variable for data_reference when looking for memtag. From-SVN: r91521
This commit is contained in:
parent
1b3c8f4655
commit
f2b60e4039
|
@ -1,3 +1,9 @@
|
||||||
|
2004-11-30 Ira Rosen <irar@il.ibm.com>
|
||||||
|
|
||||||
|
PR tree-opt/18607
|
||||||
|
* tree-vectorizer.c (vect_analyze_data_refs): Use temporary
|
||||||
|
variable for data_reference when looking for memtag.
|
||||||
|
|
||||||
2004-11-30 Jakub Jelinek <jakub@redhat.com>
|
2004-11-30 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* c-opts.c (check_deps_environment_vars): If spec != NULL, set
|
* c-opts.c (check_deps_environment_vars): If spec != NULL, set
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* { dg-require-effective-target vect_int } */
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include "tree-vect.h"
|
||||||
|
|
||||||
|
#define N 16
|
||||||
|
|
||||||
|
struct tmp_struct
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y[N];
|
||||||
|
};
|
||||||
|
|
||||||
|
int main1 ()
|
||||||
|
{
|
||||||
|
int i, *q;
|
||||||
|
struct tmp_struct tmp, *p;
|
||||||
|
|
||||||
|
p = &tmp;
|
||||||
|
q = p->y;
|
||||||
|
|
||||||
|
for (i = 0; i < N; i++)
|
||||||
|
{
|
||||||
|
*q++ = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check results: */
|
||||||
|
for (i = 0; i < N; i++)
|
||||||
|
{
|
||||||
|
if (p->y[i] != 5)
|
||||||
|
{
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
check_vect ();
|
||||||
|
|
||||||
|
return main1 ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
|
@ -4899,7 +4899,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
|
||||||
int nbbs = loop->num_nodes;
|
int nbbs = loop->num_nodes;
|
||||||
block_stmt_iterator si;
|
block_stmt_iterator si;
|
||||||
int j;
|
int j;
|
||||||
struct data_reference *dr;
|
struct data_reference *dr, *tmp_dr;
|
||||||
tree tag;
|
tree tag;
|
||||||
tree address_base;
|
tree address_base;
|
||||||
bool base_aligned_p;
|
bool base_aligned_p;
|
||||||
|
@ -5013,9 +5013,9 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
|
||||||
switch (TREE_CODE (address_base))
|
switch (TREE_CODE (address_base))
|
||||||
{
|
{
|
||||||
case ARRAY_REF:
|
case ARRAY_REF:
|
||||||
dr = analyze_array (stmt, TREE_OPERAND (symbl, 0),
|
tmp_dr = analyze_array (stmt, TREE_OPERAND (symbl, 0),
|
||||||
DR_IS_READ(dr));
|
DR_IS_READ (tmp_dr));
|
||||||
tag = vect_get_base_and_bit_offset (dr, DR_BASE_NAME (dr),
|
tag = vect_get_base_and_bit_offset (tmp_dr, DR_BASE_NAME (tmp_dr),
|
||||||
NULL_TREE, loop_vinfo, &offset, &base_aligned_p);
|
NULL_TREE, loop_vinfo, &offset, &base_aligned_p);
|
||||||
if (!tag)
|
if (!tag)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue