This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/69274] [6 Regression] 435.gromacs performance regression after r231814 on x86 Haswell and bdver2
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Feb 2016 13:32:58 +0000
- Subject: [Bug target/69274] [6 Regression] 435.gromacs performance regression after r231814 on x86 Haswell and bdver2
- Auto-submitted: auto-generated
- References: <bug-69274-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69274
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Alternate fix not causing PR69689 (but also not getting the extra speedup
observed with the original fix):
Index: gcc/ira.c
===================================================================
--- gcc/ira.c (revision 233172)
+++ gcc/ira.c (working copy)
@@ -1774,7 +1774,7 @@ ira_setup_alts (rtx_insn *insn, HARD_REG
int nop, nalt;
bool curr_swapped;
const char *p;
- int commutative = -1;
+ int commutative = -1, alt_commutative = -1;
extract_insn (insn);
alternative_mask preferred = get_preferred_alternatives (insn);
@@ -1838,6 +1838,8 @@ ira_setup_alts (rtx_insn *insn, HARD_REG
case '%':
/* The commutative modifier is handled above. */
+ if (alt_commutative < 0)
+ alt_commutative = nop;
break;
case '0': case '1': case '2': case '3': case '4':
@@ -1889,10 +1891,13 @@ ira_setup_alts (rtx_insn *insn, HARD_REG
}
if (commutative < 0)
break;
+ /* Swap forth and back to avoid changing recog_data. */
+ if (! curr_swapped
+ || alt_commutative < 0)
+ std::swap (recog_data.operand[commutative],
+ recog_data.operand[commutative + 1]);
if (curr_swapped)
break;
- std::swap (recog_data.operand[commutative],
- recog_data.operand[commutative + 1]);
}
}