https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69274
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- Ok, it's also really enabled attributes that previously triggered non-commutative ops. The following patch (in testing now) fixes the SPEC regression. Index: gcc/ira.c =================================================================== --- gcc/ira.c (revision 231814) +++ gcc/ira.c (working copy) @@ -1888,10 +1888,11 @@ ira_setup_alts (rtx_insn *insn, HARD_REG } if (commutative < 0) break; - if (curr_swapped) - break; + /* Swap forth and back to avoid changing recog_data. */ std::swap (recog_data.operand[commutative], recog_data.operand[commutative + 1]); + if (curr_swapped) + break; } }