On 05/28/2014 04:32 PM, Richard Sandiford wrote:
> While working on patches to speed up the handling of constraints,
> I hit some behaviour in ira_get_dup_out_num that looked unintentional:
>
> - the check for output operands was part of the !ignored_p condition
>   so would be skipped if the first alternative is disabled/excluded.
>
> - the first disabled/excluded alternative stops all following alternatives
>   from being processed, since we get "stuck" in the first part of the
>   "if" statement and never increment curr_alt.
>
> This seems to have some effect on the testsuite.  E.g. at -O2
> gcc.c-torture/compile/20071117-1.c has changes like:
>
>  .LCFI2:
>         movq    %rsp, %rbx
>         subq    %rax, %rsp
> -       leaq    15(%rsp), %rax
> -       andq    $-16, %rax
> -       movq    %rax, %rdi
> +       leaq    15(%rsp), %rdi
> +       andq    $-16, %rdi
>         call    bar
>         xorl    %esi, %esi
>         movq    %rbx, %rsp
>
> There are also some cases where the change introduces a move though.
> E.g. gcc.c-torture/compat/struct-ic.c has:
>
>         movabsq $4294967296, %rdx
>         addq    $8, %rsp
>  .LCFI4:
> -       andq    %rdi, %rax
> +       andq    %rax, %rdi
> +       movq    %rdi, %rax
>         orq     %rdx, %rax
>         ret
>  .L9:
>
> But AFAICT the patch is what was originally intended.
>
> Tested on x86_64-linux-gnu.  OK to install?
>
>
Ok, Richard.  Thanks for fixing this.

Reply via email to