https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
Davide Italiano <dccitaliano at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #2 from Davide Italiano <dccitaliano at gmail dot com> --- Unless I screwed up the bisection, Richard, this points to: 237e83e2158a3d9b875f8775805d04d97e8b36c1 is the first bad commit commit 237e83e2158a3d9b875f8775805d04d97e8b36c1 Author: Richard Biener <rguent...@suse.de> Date: Wed Jun 28 13:36:59 2023 +0200 tree-optimization/110451 - hoist invariant compare after interchange The following adjusts the cost model of invariant motion to consider [VEC_]COND_EXPRs and comparisons producing a data value as expensive. For 503.bwaves_r this avoids an unnecessarily high vectorization factor because of an integer comparison besides data operations on double. PR tree-optimization/110451 * tree-ssa-loop-im.cc (stmt_cost): [VEC_]COND_EXPR and tcc_comparison are expensive. * gfortran.dg/vect/pr110451.f: New testcase. gcc/testsuite/gfortran.dg/vect/pr110451.f | 51 +++++++++++++++++++++++++++++++ gcc/tree-ssa-loop-im.cc | 11 ++++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/vect/pr110451.f