https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99412
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #2) > This is also seen with zen4 comparing gcc and aocc. (about 2.3 times > differnece) Disabling @@ -6877,7 +6887,7 @@ reassociate_bb (basic_block bb) binary op are chosen wisely. */ int len = ops.length (); if (len >= 3) swap_ops_for_binary_stmt (ops, len - 3, stmt); will naturally create the reduction chain (or leave it in place) given the current rank computation. We do have (somewhat) robust fallback from reduction chain to reduction (via reduction path support), so I think this change would be OK.