* [committed] Use right shifts to eliminate redundant test/compare insns on the H8
@ 2021-06-25 13:25 Jeff Law
0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2021-06-25 13:25 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
Now we're moving on to the shifts/rotate patterns for redundant
test/compare removal. The first patch is trivial and just adds support
into select_cc_mode for the right shifts which were missing. This only
helps the H8/SX as it's the only variant currently supporting using
shifts to eliminate redundant test/compare insns, but it'll be needed
for the other H8 variants soon enough.
This has gone through the usual ~24hr test cycle. Committing to the trunk.
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1282 bytes --]
commit 3a50aed09edc5e69080a0e49851acdb874227256
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 --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:25 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:25 [committed] 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).