This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] h8300.md: Relax the condition of a peephole2.


Hi,

Attached is a patch to relax the condition of a peephole2.

With this relaxation, we can transform

	mov.l	@(4,er0),er0
 	and.l	#1,er0

into

	mov.w	@(6,er0),r0
 	and.l	#1,er0

Tested on h8300 port.  Committed.

Kazu Hirata

2003-03-06  Kazu Hirata  <kazu at cs dot umass dot edu>

	* config/h8300/h8300.md (a peephole2): Don't use
	reg_overlap_mentioned_p.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.189
diff -u -r1.189 h8300.md
--- h8300.md	6 Mar 2003 15:14:37 -0000	1.189
+++ h8300.md	7 Mar 2003 01:33:23 -0000
@@ -3591,7 +3591,6 @@
 	(and:SI (match_dup 0)
 		(match_operand:SI 2 "const_int_operand" "")))]
   "(TARGET_H8300H || TARGET_H8300S)
-   && !reg_overlap_mentioned_p (operands[0], operands[1])
    && !(GET_CODE (operands[1]) == MEM && MEM_VOLATILE_P (operands[1]))
    && (INTVAL (operands[2]) & ~0xffff) == 0
    && INTVAL (operands[2]) != 255"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]