This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][i386] Fix ix86_loop_unroll_adjust
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <jh at suse dot de>
- Date: Mon, 5 Feb 2018 09:53:51 +0100 (CET)
- Subject: [PATCH][i386] Fix ix86_loop_unroll_adjust
- Authentication-results: sourceware.org; auth=none
The following fixes an oversight(?) in ix86_loop_unroll_adjust which
will happily bump unrolling to unreasonable amounts for bdverN.
Bootstrap / regtest running on x86_64-unknown-linux-gnu, ok?
Thanks,
Richard.
2018-02-05 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (print_reg): Fix typo.
(ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 257382)
+++ gcc/config/i386/i386.c (working copy)
@@ -17946,7 +17946,7 @@ print_reg (rtx x, int code, FILE *file)
F,f -- likewise, but for floating-point.
O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, expand to "w.", "l." or "q.",
otherwise nothing
- R -- print embeded rounding and sae.
+ R -- print embedded rounding and sae.
r -- print only sae.
z -- print the opcode suffix for the size of the current operand.
Z -- likewise, with special suffixes for x87 instructions.
@@ -50560,7 +50560,7 @@ ix86_loop_unroll_adjust (unsigned nunrol
free (bbs);
if (mem_count && mem_count <=32)
- return 32/mem_count;
+ return MIN (nunroll, 32 / mem_count);
return nunroll;
}