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 adambne...@gmail.com: 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 adambne...@gmail.com: fanqifei fanqi...@gmail.com 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

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

2010-01-18 Thread fanqifei
2010/1/18 Adam Nemet adambne...@gmail.com: 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

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 Nemetadambne...@gmail.com: 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.

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

2010-01-17 Thread Adam Nemet
fanqifei fanqi...@gmail.com 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

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 b...@broadcom.com: 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= (x0xFF00) | ((i16)0x00FF); is exactly what insv can

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

2010-01-14 Thread Ian Lance Taylor
David Daney dda...@caviumnetworks.com writes: but insv is a standard pattern name. the semantics of expression x= (x0xFF00) | ((i16)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

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

2010-01-13 Thread Bingfeng Mei
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 description file. However, the insv instruction can only

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

2010-01-13 Thread fanqifei
2010/1/13 Bingfeng Mei b...@broadcom.com: 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= (x0xFF00) | ((i16)0x00FF); is exactly what insv can do. I all tried

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

2010-01-13 Thread Bingfeng Mei
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 b...@broadcom.com: Your instruction is likely too specific to be picked up by GCC. You may use an intrinisc for it. Bingfeng

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

2010-01-13 Thread fanqifei
2010/1/13 Bingfeng Mei b...@broadcom.com: 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

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