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

Reply via email to