diff mbox series

[i386] Fix ix86_loop_unroll_adjust

Message ID alpine.LSU.2.20.1802050948080.18265@zhemvz.fhfr.qr
State New
Headers show
Series [i386] Fix ix86_loop_unroll_adjust | expand

Commit Message

Richard Biener Feb. 5, 2018, 8:53 a.m. UTC
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.

Comments

Jan Hubicka Feb. 5, 2018, 2:36 p.m. UTC | #1
Dne 2018-02-05 09:53, Richard Biener napsal:
> 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?

OK,
thanks!

Honza
diff mbox series

Patch

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;
 }