Hi,
On Fri, 9 Dec 2011, Georg-Johann Lay wrote:
> This is pretty much straight forward, and I don't understand the problems with
> - canonicalize stuff
> - optimize on canonicalized representation
> - lower canonicalized representation to best RTL
I don't think anyone would reject patches that d
Jakub Jelinek wrote:
> On Fri, Dec 09, 2011 at 01:50:37PM +0100, Georg-Johann Lay wrote:
>> No, not OK.
>>
>> This leads to unacceptable code for devices that cannot shift easily like,
>> e.g.
>> AVR. This target can only shift by 1 and shifts with big offsets have to be
>> performed by means of a
On Fri, Dec 09, 2011 at 01:50:37PM +0100, Georg-Johann Lay wrote:
> No, not OK.
>
> This leads to unacceptable code for devices that cannot shift easily like,
> e.g.
> AVR. This target can only shift by 1 and shifts with big offsets have to be
> performed by means of a loop at runtime.
Andrew's
Andrew Pinski wrote:
> Hi,
> After SSA-expand, the code which did the optimization for
> (a&(1<>C)&1 became not working because BIT_AND_EXPR
> would no longer be in there. This patch fixes the problem by using
> get_def_for_expr to get the BIT_AND_EXPR.
>
> OK? Bootstrapped and tested on x86_6
On Thu, Dec 8, 2011 at 1:32 PM, Richard Henderson wrote:
> On 12/06/2011 08:17 PM, Andrew Pinski wrote:
>> + if (a & (long long) 0x400)
>> + return 1;
>> + return 0;
>> +}
>> +
>> +/* { dg-final { scan-assembler "andl" { target i?86-*-linux*
>> x86_64-*-linux* } } } " */
>> +/* { dg-fina
On 12/06/2011 08:17 PM, Andrew Pinski wrote:
> + if (a & (long long) 0x400)
> + return 1;
> + return 0;
> +}
> +
> +/* { dg-final { scan-assembler "andl" { target i?86-*-linux* x86_64-*-linux*
> } } } " */
> +/* { dg-final { scan-assembler "setne" { target i?86-*-linux*
> x86_64-*-linux*
Hi,
After SSA-expand, the code which did the optimization for
(a&(1<>C)&1 became not working because BIT_AND_EXPR
would no longer be in there. This patch fixes the problem by using
get_def_for_expr to get the BIT_AND_EXPR.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
T