re PR tree-optimization/90078 (ICE with deep templates caused by overflow)
authorBin Cheng <bin.cheng@linux.alibaba.com>
Wed, 8 May 2019 11:37:45 +0000 (11:37 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 8 May 2019 11:37:45 +0000 (11:37 +0000)
commit8363a2f1f7c47d7b3d1760ce631a6824e91c0d80
treed461e0f136c5998e3bd723cd0f6ac69f29170b61
parent98d8f142132ac670da2dc99cce530048343ab948
re PR tree-optimization/90078 (ICE with deep templates caused by overflow)

PR tree-optimization/90078
* tree-ssa-loop-ivopts.c (INFTY): Increase value for infinite cost.
(struct comp_cost): Promote type of members to int64_t.
(infinite_cost): Don't set complexity in initialization.
(comp_cost::operator +,-,+=,-+,/=,*=): Assert when cost computation
overflows to infinite_cost.
(adjust_setup_cost): Promote type of parameter and cost computation
to int64_t.
(struct ainc_cost_data, struct iv_ca): Promote type of member to
int64_t.
(get_scaled_computation_cost_at, determine_iv_cost): Promote type of
cost computation to int64_t.
(determine_group_iv_costs, iv_ca_dump, find_optimal_iv_set): Use
int64_t's format specifier in dump.

gcc/testsuite
* g++.dg/tree-ssa/pr90078.C: New test.

From-SVN: r271008
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr90078.C [new file with mode: 0644]
gcc/tree-ssa-loop-ivopts.c