https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110451
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:237e83e2158a3d9b875f8775805d04d97e8b36c1 commit r14-2161-g237e83e2158a3d9b875f8775805d04d97e8b36c1 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.