Re: addition of patterns in md file

Michael Meissner <compilers@the-meissners.org>
Tue, 05 Feb 2008 08:05:30 -0500

          From comp.compilers

Related articles
conditional based transfer patterns in md file abhi353@gmail.com (abhishekRoy) (2008-02-01)
addition of patterns in md file abhi353@gmail.com (abhishekRoy) (2008-02-01)
Re: addition of patterns in md file compilers@the-meissners.org (Michael Meissner) (2008-02-05)
| List of all articles for this month |

From: Michael Meissner <compilers@the-meissners.org>
Newsgroups: comp.compilers
Date: Tue, 05 Feb 2008 08:05:30 -0500
Organization: Compilers Central
References: 08-02-009 08-02-010
Keywords: GCC
Posted-Date: 06 Feb 2008 21:54:14 EST

abhishekRoy <abhi353@gmail.com> writes:


> Our target supports 'addm op1,op2' instruction which perform following
> operation.
> op2=sign_extend(op1)+op2
> where 'op1' is 16bit integer operand and 'op2' is 32bit integer
> operand.before performing addition 'op1' is sign_extended to 32 bit
> number and then perform addition with 'op2' and store the result in
> 'op2'.


Note, the combiner is only run if you are optimizing. If you are just saying
gcc foo.c and looking at the output, it won't run the combiner. If you are
optimzing, try putting a breakpoint on recog_for_combine, and follow through to
determine where it is failing. You can see what pattern is being combined by
doing:


(gdb) print *pnewpat
(gdb) pr


and pr is a gdb macro in .gdbinitrc that calls debug_rtx in the compiler with
the last value printed.


--
Michael Meissner
email: compilers@the-meissners.org
http://www.the-meissners.org


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.