From: Hans-Peter Nilsson Date: Fri, 28 Apr 2023 22:12:39 +0000 (+0200) Subject: CRIS: Fix ccmode typo in cris_postdbr_cmpelim X-Git-Tag: basepoints/gcc-15~9494 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46f9d150c712e70c41aed7293058a75e55c8300f;p=thirdparty%2Fgcc.git CRIS: Fix ccmode typo in cris_postdbr_cmpelim 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. --- diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc index 1c7289b027b8..7fca2af085a7 100644 --- a/gcc/config/cris/cris.cc +++ b/gcc/config/cris/cris.cc @@ -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. */