aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2021-06-25 09:22:28 -0400
committerJeff Law <jeffreyalaw@gmail.com>2021-06-25 09:22:28 -0400
commit3a50aed09edc5e69080a0e49851acdb874227256 (patch)
tree23edb7c61b8c7a27d6a70f51dda3c6b2e6b8e8a4 /gcc
parent55a1546b73b60d2601f35671ba9e8f12a52a7b77 (diff)
downloadgcc-3a50aed09edc5e69080a0e49851acdb874227256.zip
gcc-3a50aed09edc5e69080a0e49851acdb874227256.tar.gz
gcc-3a50aed09edc5e69080a0e49851acdb874227256.tar.bz2
Use right shifts to eliminate redundant test/compare insns on the H8
gcc/ * config/h8300/h8300.c (select_cc_mode): Handle ASHIFTRT and LSHIFTRT.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/h8300/h8300.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 511c2b2..d8b4bfc 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)))