public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] CRIS: Fix ccmode typo in cris_postdbr_cmpelim
@ 2023-05-10  0:33 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-05-10  0:33 UTC (permalink / raw)
  To: gcc-patches

Typo spotted while doing CCmode improvements, as a missed
optimization.  It's almost visible from the patch context;
there's not much done in terms of "mode-adjustment" when
replacing (reg:CC CRIS_CC0_REGNUM) with a copy!
This bug affects functions in the newlib printf-formatting
functions (nothing else in libgcc or newlib libc), with the
performance impact on coremark scores being less than 1e-6
(3/5078992 cycles, 6/48543 bytes).

	* config/cris/cris.cc (cris_postdbr_cmpelim): Correct mode
	of modeadjusted_dccr.
---
 gcc/config/cris/cris.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc
index 05dead9c0778..5b4cc4e204eb 100644
--- a/gcc/config/cris/cris.cc
+++ b/gcc/config/cris/cris.cc
@@ -432,7 +432,7 @@ cris_postdbr_cmpelim ()
 		  machine_mode ccmode = GET_MODE (src);
 		  rtx modeadjusted_dccr
 		    = (ccmode == CCmode ? dccr
-		       : gen_rtx_REG (CCmode, CRIS_CC0_REGNUM));
+		       : gen_rtx_REG (ccmode, CRIS_CC0_REGNUM));
 		  rtx compare
 		    /* We don't need to copy_rtx pat: we're going to
 		       delete that insn. */
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-10  0:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10  0:33 [committed] CRIS: Fix ccmode typo in cris_postdbr_cmpelim Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).