This is the mail archive of the gcc@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]

Re: peephole patterns are not matching


On 4/12/07, Andreas Schwab <schwab@suse.de> wrote:
"Mohamed Shafi" <shafitvm@gmail.com> writes:

> 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"))]

The patterns match mode SF, but the insns have mode SQ.

sorry actually the patterns are like this


(insn 69 34 70 (set (reg:SF 0 d0)
       (reg:SF 18 f2)) 79 {movsf} (nil)
   (nil))

(insn 70 69 35 (set (reg:SF 16 f0 [orig:38 D.3693 ] [38])
       (reg:SF 0 d0)) 79 {movsf} (nil)
   (nil))

and the peephole is same as the above


Andreas.


--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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