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: help on adding new insns like min/max


I tried my gcc with definition of sminsi3/smaxsi3 and I dumpped
all debug info, gcc always treats min as a function call in my
test.c.00.rtl through test.c.30.dbr:

(call (mem:SI (symbol_ref/v:SI ("smin")) ))

I think once gcc found that is a function call, it would not 
optimize it, am I right?
What I should get is something like "(smin: SI ...", is that right?
So probably I need to change something other than xxx.md?
Thanks.

--- Dale Johannesen <dalej@apple.com> wrote:
> 
> On Monday, October 21, 2002, at 03:18  PM, Ming Ouyang wrote:
> 
> > Dale,
> >
> > Thanks for your reply, but I wonder how gcc will handle code like:
> > c = min(a, b)
> > Does min/max will be treated as builtins? Or can you demonstrate
> > how to make gcc to use sminsi3/smaxsi3... to use min/max insns for
> > code like that?
> 
> The optimization phases should create min/max from simpler RTL.
> See noce_try_minmax in ifcvt.c.  That won't necessarily handle
> whatever case you want to handle, but it will give you an idea.
> 


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


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