summaryrefslogtreecommitdiff
path: root/gcc/tree-predcom.c
diff options
context:
space:
mode:
authortomby <tomby@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-03 13:35:13 +0000
committertomby <tomby@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-03 13:35:13 +0000
commit880734c8866685187a2141807581829f11cc01db (patch)
treece8e0b8567348f3139f7c4c74dd94700b18f970f /gcc/tree-predcom.c
parent2b3e0f149e690f1cd112b3164392ebef8488ce31 (diff)
downloadgcc-880734c8866685187a2141807581829f11cc01db.tar.gz
PR middle-end/38250
* tree-loop-distribution.c (build_size_arg): New function. (generate_memset_zero): Checks if DR_STEP(de) is NULL. Reorganized generating of stmts. * testsuite/gcc.dg/tree-ssa/pr38250.c: New file. * tree-data-ref.c (dr_analyze_innermost): Returns bool. Indicate if analysis succeed. * tree-data-ref.h (dr_analyze_innermost): Returns bool. * tree-predcom.c (valid_initializer_p, find_looparound_phi): Uses new definition of dr_analyze_innermost. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r--gcc/tree-predcom.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index b6ccfd79cc8..54e0b7fe160 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1026,9 +1026,6 @@ valid_initializer_p (struct data_reference *ref,
aff_tree diff, base, step;
double_int off;
- if (!DR_BASE_ADDRESS (ref))
- return false;
-
/* Both REF and ROOT must be accessing the same object. */
if (!operand_equal_p (DR_BASE_ADDRESS (ref), DR_BASE_ADDRESS (root), 0))
return false;
@@ -1115,7 +1112,8 @@ find_looparound_phi (struct loop *loop, dref ref, dref root)
memset (&init_dr, 0, sizeof (struct data_reference));
DR_REF (&init_dr) = init_ref;
DR_STMT (&init_dr) = phi;
- dr_analyze_innermost (&init_dr);
+ if (!dr_analyze_innermost (&init_dr))
+ return NULL;
if (!valid_initializer_p (&init_dr, ref->distance + 1, root->ref))
return NULL;