On Fri, May 11, 2007 at 05:56:16PM +0530, Rahul wrote:
> I have PLUS, MULT and following MAC pattern, in my target.md file.
> (define_insn ""
>       [(set   (match_operand:SI 0 "data_reg" "=f")
>               (plus:SI (mult:SI (match_operand:SI 1 "data_reg" "f")
>                       (match_operand:SI 2 "data_reg" "f"))
>               (match_operand:SI 3 "data_reg" "0")))]
>       ""
>       "mac\\t%1, %2, %3"
>       [(set_attr "type" "arith")
>       (set_attr "length" "2")]
> )
> 
> But for the following example
>  int a = 1;
>  int b = 2;
>  int c = 3;
>  c = c + a * b;
> the MAC pattern is not getting recognized, instead it is still using
> PLUS and MULT patterns.

   See what is in the progname.c.*.combine file produced by
-fdump-rtl-combine.

   Double check that your "data_reg" predicate is working.   

   You will make your life easier by giving the insn pattern a name. The RTL
dumps and in particular the -S -dp output will be easier to read.

-- 
Rask Ingemann Lambertsen

Reply via email to