This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
peephole patterns are not matching
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 12 Apr 2007 14:15:01 +0530
- Subject: peephole patterns are not matching
hello everyone,
I have the following 2 patterns which are consecutive. (from shorten
rtl dump file)
(insn 69 34 70 (set (reg:SQ 0 d0)
(reg:SQ 18 f2)) 79 {movsq} (nil)
(nil))
(insn 70 69 35 (set (reg:SQ 16 f0 [orig:38 D.3693 ] [38])
(reg:SQ 0 d0)) 79 {movsq} (nil)
(nil))
For the above pattern i wrote a peephole like this
(define_peephole
[(set (match_operand:SF 0 "data_reg" "=d")
(match_operand:SF 1 "float_reg" "f"))
(set (match_operand:SF 2 "float_reg" "=f")
(match_operand:SF 3 "data_reg" "d"))]
"REGNO(operands[0]) == REGNO(operands[3])"
"movf\\t%1, %3"
)
even i wrote define_peephole2 which is similar to the above.
But the above patterns are not matched at all. But i can find these
patterns in the rtl dumps.
What could be the reason for this behavior?
Regards,
Shafi