[committed] CRIS: Fix ccmode typo in cris_postdbr_cmpelim

Message ID 20230510003326.8B65620423@pchp3.se.axis.com
State Repeat Merge
Headers
Series [committed] CRIS: Fix ccmode typo in cris_postdbr_cmpelim |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Hans-Peter Nilsson May 10, 2023, 12:33 a.m. UTC
  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(-)
  

Patch

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. */