public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1810] Use right shifts to eliminate redundant test/compare insns on the H8
@ 2021-06-25 13:24 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2021-06-25 13:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3a50aed09edc5e69080a0e49851acdb874227256

commit r12-1810-g3a50aed09edc5e69080a0e49851acdb874227256
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Fri Jun 25 09:22:28 2021 -0400

    Use right shifts to eliminate redundant test/compare insns on the H8
    
    gcc/
            * config/h8300/h8300.c (select_cc_mode): Handle ASHIFTRT and LSHIFTRT.

Diff:
---
 gcc/config/h8300/h8300.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 511c2b28e40..d8b4bfcbdbe 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -1947,9 +1947,10 @@ h8300_select_cc_mode (enum rtx_code cond, rtx op0, rtx op1)
   if (op1 == const0_rtx
       && (cond == EQ || cond == NE || cond == LT || cond == GE)
       && (GET_CODE (op0) == PLUS || GET_CODE (op0) == MINUS
-          || GET_CODE (op0) == NEG || GET_CODE (op0) == AND
-          || GET_CODE (op0) == IOR || GET_CODE (op0) == XOR
-          || GET_CODE (op0) == NOT || GET_CODE (op0) == ASHIFT
+	  || GET_CODE (op0) == NEG || GET_CODE (op0) == AND
+	  || GET_CODE (op0) == IOR || GET_CODE (op0) == XOR
+	  || GET_CODE (op0) == NOT || GET_CODE (op0) == ASHIFT
+	  || GET_CODE (op0) == ASHIFTRT || GET_CODE (op0) == LSHIFTRT
 	  || GET_CODE (op0) == MULT || GET_CODE (op0) == SYMBOL_REF
 	  || GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND
 	  || REG_P (op0) || MEM_P (op0)))


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

only message in thread, other threads:[~2021-06-25 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 13:24 [gcc r12-1810] Use right shifts to eliminate redundant test/compare insns on the H8 Jeff Law

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).