Re: ARM/getting rid of superfluous zero extension

2012-10-04 Thread Kenneth Zadeck
David and i have been talking about this for some time. what is needed is a real global optimization algorithm. my leaning is to make do it at the rtl level because that is where everything has been exposed. but it would be a lot easier in ssa form. The first step in my opinion is to ask t

Re: ARM/getting rid of superfluous zero extension

2012-10-04 Thread David Edelsohn
On Thu, Oct 4, 2012 at 2:18 PM, Eric Botcazou wrote: >> Any suggestion about how I could avoid generating this zero_extension? > > Redundant extensions have been a hot topic for some time. The combiner should > catch the local easy cases, we have ree.c for the nonlocal easy cases and Tom > recent

Re: ARM/getting rid of superfluous zero extension

2012-10-04 Thread Eric Botcazou
> Any suggestion about how I could avoid generating this zero_extension? Redundant extensions have been a hot topic for some time. The combiner should catch the local easy cases, we have ree.c for the nonlocal easy cases and Tom recently posted: http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00

ARM/getting rid of superfluous zero extension

2012-10-03 Thread Christophe Lyon
Hi, I have recently added ARM support for builtin_bswap16, which uses the rev16 instruction when dealing with an unsigned argument. Considering: unsigned short myfunc(unsigned short x) { return __builtin_bswap16(x); } gcc -O2 generates: myfunc: rev16 r0, r0 uxthr0, r0