diff options
author | Andrew Haley <aph@redhat.com> | 2017-03-08 11:35:23 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2017-03-08 11:35:23 +0000 |
commit | f1a675e486155ebeb0abc90b73aa75d7079d9b58 (patch) | |
tree | 8193f00a0d438ba2efedc392641923b049315a04 /gcc/tree-ssa-loop-split.c | |
parent | 2ff555ff0e711a1f75b4b7054b50650a6d6770b4 (diff) | |
download | gcc-f1a675e486155ebeb0abc90b73aa75d7079d9b58.zip gcc-f1a675e486155ebeb0abc90b73aa75d7079d9b58.tar.gz gcc-f1a675e486155ebeb0abc90b73aa75d7079d9b58.tar.bz2 |
re PR tree-optimization/79943 (Loop splitting breaks with loops of pointer type)
2017-03-08 Andrew Haley <aph@redhat.com>
PR tree-optimization/79943
* tree-ssa-loop-split.c (compute_new_first_bound): When
calculating the new upper bound, (END-BEG) should be added, not
subtracted.
From-SVN: r245974
Diffstat (limited to 'gcc/tree-ssa-loop-split.c')
-rw-r--r-- | gcc/tree-ssa-loop-split.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c index 39bffc4..fd97213 100644 --- a/gcc/tree-ssa-loop-split.c +++ b/gcc/tree-ssa-loop-split.c @@ -436,7 +436,6 @@ compute_new_first_bound (gimple_seq *stmts, struct tree_niter_desc *niter, if (POINTER_TYPE_P (TREE_TYPE (guard_init))) { enddiff = gimple_convert (stmts, sizetype, enddiff); - enddiff = gimple_build (stmts, NEGATE_EXPR, sizetype, enddiff); newbound = gimple_build (stmts, POINTER_PLUS_EXPR, TREE_TYPE (guard_init), guard_init, enddiff); |