This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] h8300.md: Relax conditions on some insns.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 02 Jan 2003 13:53:39 -0500 (EST)
- Subject: [patch] h8300.md: Relax conditions on some insns.
Hi,
Attached is a patch to relax conditions on some insns.
Some insns have REG_P as a part of the insn conditions, causing
subregs not to be accepted. The patch relax those conditions.
Tested on h8300 port. Committed.
Kazu Hirata
2003-01-02 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*iorhi3_zext): Relax the condition.
(*iorhi3_two_qi): Likewise.
(*iorsi3_zexthi): Likewise.
(*xorhi3_zextqi): Likewise.
(*xorsi3_zexthi): Likewise.
(*xorsi3_zextqi): Likewise.
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.141
diff -u -r1.141 h8300.md
--- h8300.md 2 Jan 2003 14:59:30 -0000 1.141
+++ h8300.md 2 Jan 2003 18:41:28 -0000
@@ -2376,9 +2376,7 @@
[(set (match_operand:HI 0 "register_operand" "=r")
(ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
(match_operand:HI 2 "register_operand" "0")))]
- "REG_P (operands[0])
- && REG_P (operands[1])
- && REGNO (operands[0]) != REGNO (operands[1])"
+ ""
"or\\t%X1,%s0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
@@ -2408,9 +2406,7 @@
(ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "0"))
(ashift:HI (match_operand:HI 2 "register_operand" "r")
(const_int 8))))]
- "REG_P (operands[0])
- && REG_P (operands[2])
- && REGNO (operands[0]) != REGNO (operands[2])"
+ ""
"mov.b\\t%s2,%t0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
@@ -2421,10 +2417,7 @@
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))
(match_operand:SI 2 "register_operand" "0")))]
- "(TARGET_H8300H || TARGET_H8300S)
- && REG_P (operands[0])
- && REG_P (operands[1])
- && (REGNO (operands[0]) != REGNO (operands[1]))"
+ "TARGET_H8300H || TARGET_H8300S"
"or.w\\t%T1,%f0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
@@ -2464,9 +2457,7 @@
[(set (match_operand:HI 0 "register_operand" "=r")
(xor:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
(match_operand:HI 2 "register_operand" "0")))]
- "REG_P (operands[0])
- && REG_P (operands[1])
- && REGNO (operands[0]) != REGNO (operands[1])"
+ ""
"xor\\t%X1,%s0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
@@ -2477,10 +2468,7 @@
[(set (match_operand:SI 0 "register_operand" "=r")
(xor:SI (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))
(match_operand:SI 2 "register_operand" "0")))]
- "(TARGET_H8300H || TARGET_H8300S)
- && REG_P (operands[0])
- && REG_P (operands[1])
- && (REGNO (operands[0]) != REGNO (operands[1]))"
+ "TARGET_H8300H || TARGET_H8300S"
"xor.w\\t%T1,%f0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
@@ -2489,9 +2477,7 @@
[(set (match_operand:SI 0 "register_operand" "=r")
(xor:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "r"))
(match_operand:SI 2 "register_operand" "0")))]
- "REG_P (operands[0])
- && REG_P (operands[1])
- && REGNO (operands[0]) != REGNO (operands[1])"
+ ""
"xor\\t%X1,%w0"
[(set_attr "cc" "clobber")
(set_attr "length" "2")])