diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-19 20:56:27 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-19 20:56:27 +0000 |
commit | 99c68579e5ffe20ed5bc4cdf82633a31ed649c21 (patch) | |
tree | fcc4ee581e8607a84c3348cb57868886d14503f1 /gcc/tree-chrec.c | |
parent | e1c7e835d80ec538b2999827f6c4258e2bbc3bee (diff) | |
download | gcc-99c68579e5ffe20ed5bc4cdf82633a31ed649c21.tar.gz |
PR tree-optimization/46077
* tree-chrec.c (eq_evolutions_p): Accept some expressions.
testsuite/
PR tree-optimization/46077
* gcc.dg/vect/O3-pr46077.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 72955108c7b..0c13c21bfe8 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1433,6 +1433,16 @@ eq_evolutions_p (const_tree chrec0, const_tree chrec1) return (CHREC_VARIABLE (chrec0) == CHREC_VARIABLE (chrec1) && eq_evolutions_p (CHREC_LEFT (chrec0), CHREC_LEFT (chrec1)) && eq_evolutions_p (CHREC_RIGHT (chrec0), CHREC_RIGHT (chrec1))); + + case PLUS_EXPR: + case MULT_EXPR: + case MINUS_EXPR: + case POINTER_PLUS_EXPR: + return eq_evolutions_p (TREE_OPERAND (chrec0, 0), + TREE_OPERAND (chrec1, 0)) + && eq_evolutions_p (TREE_OPERAND (chrec0, 1), + TREE_OPERAND (chrec1, 1)); + default: return false; } |