Re: GCC-How does the coding style affect the insv pattern recognization?

2010-02-01 Thread Adam Nemet
fanqifei writes: > 2010/1/18 Adam Nemet : > > Sorry for jumping in late. See make_file_assigment in combine.c. > > > > The problem usually is that: > > > > (set A (ior (and B C1) OTHER)) > > > > can only be turned into a bit-insertion if A and B happen to be the same > > pseudos. > > > > Adam > >

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-29 Thread fanqifei
2010/1/18 Adam Nemet : > fanqifei writes: >>     Paolo Bonzini said that insv instruction might be synthesized >> later by combine. But combine only works on at most 3 instructions and >> insv is not generated in such case. >>     So exactly when will the insv pattern be recognized and how does >>

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-18 Thread Jeff Law
On 01/18/10 03:39, fanqifei wrote: 2010/1/18 Adam Nemet: Sorry for jumping in late. See make_file_assigment in combine.c. The problem usually is that: (set A (ior (and B C1) OTHER)) can only be turned into a bit-insertion if A and B happen to be the same pseudos. Adam Thank yo

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-18 Thread fanqifei
2010/1/18 Adam Nemet : > Sorry for jumping in late.  See make_file_assigment in combine.c. > > The problem usually is that: > >  (set A (ior (and B C1) OTHER)) > > can only be turned into a bit-insertion if A and B happen to be the same > pseudos. > > Adam > Thank you, Adam. The problem is that be

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-17 Thread Adam Nemet
fanqifei writes: > Paolo Bonzini said that insv instruction might be synthesized > later by combine. But combine only works on at most 3 instructions and > insv is not generated in such case. > So exactly when will the insv pattern be recognized and how does > the coding style affect it?

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-14 Thread Ian Lance Taylor
David Daney writes: >> but insv is a standard pattern name. >> the semantics of expression x= (x&0xFF00) | ((i<<16)&0x00FF); >> is exactly what insv can do. >> I all tried mips gcc cross compiler, and ins is also not generated. > > You must be doing something wrong: > > $ cat fanqifei.c >

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-14 Thread David Daney
fanqifei wrote: 2010/1/13 Bingfeng Mei : Your instruction is likely too specific to be picked up by GCC. You may use an intrinisc for it. Bingfeng but insv is a standard pattern name. the semantics of expression x= (x&0xFF00) | ((i<<16)&0x00FF); is exactly what insv can do. I all trie

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-13 Thread fanqifei
2010/1/13 Bingfeng Mei : > OOPs, I don't know that. Anyway, I won't count on GCC to > reliably pick up these complex patterns.  In our port, we > implemented clz/ffs/etc as intrinsics though they are present as > standard patterns. > > Bingfeng Could you please show me the path of the source code t

RE: GCC-How does the coding style affect the insv pattern recognization?

2010-01-13 Thread Bingfeng Mei
ail.com] > Sent: 13 January 2010 10:26 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: GCC-How does the coding style affect the insv > pattern recognization? > > 2010/1/13 Bingfeng Mei : > > Your instruction is likely too specific to be picked up by GCC. > >

Re: GCC-How does the coding style affect the insv pattern recognization?

2010-01-13 Thread fanqifei
2010/1/13 Bingfeng Mei : > Your instruction is likely too specific to be picked up by GCC. > You may use an intrinisc for it. > > Bingfeng but insv is a standard pattern name. the semantics of expression x= (x&0xFF00) | ((i<<16)&0x00FF); is exactly what insv can do. I all tried mips gcc cr

RE: GCC-How does the coding style affect the insv pattern recognization?

2010-01-13 Thread Bingfeng Mei
; Subject: GCC-How does the coding style affect the insv > pattern recognization? > > Hi, > I am working on a micro controller and trying to port > gcc(4.3.2) for it. > There is insv instruction in our micro controller and I have add > define_insn to machine de

GCC-How does the coding style affect the insv pattern recognization?

2010-01-12 Thread fanqifei
Hi, I am working on a micro controller and trying to port gcc(4.3.2) for it. There is insv instruction in our micro controller and I have add define_insn to machine description file. However, the insv instruction can only be generated when the code is written like below. If the code is