]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
CRIS: Fix ccmode typo in cris_postdbr_cmpelim
authorHans-Peter Nilsson <hp@axis.com>
Fri, 28 Apr 2023 22:12:39 +0000 (00:12 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Wed, 10 May 2023 00:32:17 +0000 (02:32 +0200)
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

index 1c7289b027b89a363636e26eafb6128884ea6d8f..7fca2af085a7644c038d9dd9e0f0b53800079d81 100644 (file)
@@ -433,7 +433,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. */