re PR tree-optimization/84512 (Missed optimization: should be precalculated in compil...
authorRichard Biener <rguenther@suse.de>
Tue, 27 Feb 2018 15:25:33 +0000 (15:25 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 27 Feb 2018 15:25:33 +0000 (15:25 +0000)
commitb1ddb654aba3859e025565c0af35d1a704c8e5d0
treecf62b5231022071ef9708e731b1392bba45cd82d
parentc16d3e3c875cb00ff8cffbdf1aa58ab0932e767d
re PR tree-optimization/84512 (Missed optimization: should be precalculated in compile-time)

2018-02-27  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84512
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Do not use the estimate returned from record_stmt_cost for
the scalar iteration cost but sum properly using add_stmt_cost.

* gcc.dg/tree-ssa/pr84512.c: New testcase.

From-SVN: r258036
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr84512.c [new file with mode: 0644]
gcc/tree-vect-loop.c