diff options
author | Bin Cheng <bin.cheng@linux.alibaba.com> | 2019-04-30 03:00:59 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2019-04-30 03:00:59 +0000 |
commit | 8c3ce59e2b10ecc3cf7fe9804005405bedc3e280 (patch) | |
tree | 975cba07711e0530b593d2d2fd96957261cb3536 /gcc/tree-ssa-loop-ivopts.c | |
parent | 0c0b2104b467f85b7dcdd97285fbfa22c08b70f8 (diff) | |
download | gcc-8c3ce59e2b10ecc3cf7fe9804005405bedc3e280.zip gcc-8c3ce59e2b10ecc3cf7fe9804005405bedc3e280.tar.gz gcc-8c3ce59e2b10ecc3cf7fe9804005405bedc3e280.tar.bz2 |
re PR tree-optimization/90240 (ICE in try_improve_iv_set, at tree-ssa-loop-ivopts.c:6694)
PR tree-optimization/90240
Revert:
2019-04-23 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/90078
* tree-ssa-loop-ivopts.c (comp_cost::operator +,-,+=,-+,/=,*=): Add
checks for infinite_cost overflow.
* gcc/testsuite/g++.dg/tree-ssa/pr90078.C: New test.
From-SVN: r270673
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 4ca1f0e..a2b6b2b 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -243,9 +243,6 @@ operator+ (comp_cost cost1, comp_cost cost2) if (cost1.infinite_cost_p () || cost2.infinite_cost_p ()) return infinite_cost; - if (cost1.cost + cost2.cost >= infinite_cost.cost) - return infinite_cost; - cost1.cost += cost2.cost; cost1.complexity += cost2.complexity; @@ -259,8 +256,6 @@ operator- (comp_cost cost1, comp_cost cost2) return infinite_cost; gcc_assert (!cost2.infinite_cost_p ()); - if (cost1.cost - cost2.cost >= infinite_cost.cost) - return infinite_cost; cost1.cost -= cost2.cost; cost1.complexity -= cost2.complexity; @@ -281,8 +276,6 @@ comp_cost::operator+= (HOST_WIDE_INT c) if (infinite_cost_p ()) return *this; - if (this->cost + c >= infinite_cost.cost) - return infinite_cost; this->cost += c; return *this; @@ -294,8 +287,6 @@ comp_cost::operator-= (HOST_WIDE_INT c) if (infinite_cost_p ()) return *this; - if (this->cost - c >= infinite_cost.cost) - return infinite_cost; this->cost -= c; return *this; @@ -304,7 +295,6 @@ comp_cost::operator-= (HOST_WIDE_INT c) comp_cost comp_cost::operator/= (HOST_WIDE_INT c) { - gcc_assert (c != 0); if (infinite_cost_p ()) return *this; @@ -319,9 +309,6 @@ comp_cost::operator*= (HOST_WIDE_INT c) if (infinite_cost_p ()) return *this; - if (this->cost * c >= infinite_cost.cost) - return infinite_cost; - this->cost *= c; return *this; |