https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65805

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #3)
> It is clearer to see the issue if one compiles the whole file with
> -fno-lra-remat:
> 
> markus@x4 Release % g++ -S -fno-lra-remat -fPIC -fvisibility=hidden -pthread
> -march=x86-64 -O2 -fno-exceptions -fno-rtti -std=gnu++11 -Wall -c
> file_util.ii -o out_good
> markus@x4 Release % g++ -S -fPIC -fvisibility=hidden -pthread -march=x86-64
> -O2 -fno-exceptions -fno-rtti -std=gnu++11 -Wall -c file_util.ii -o out_bad  
> markus@x4 Release % diff -u out_good out_bad
> ...
> @@ -4616,7 +4616,7 @@
>         pushq   %rbp
>         .cfi_def_cfa_offset 128
>         movl    20(%rsp), %edx
> -       movq    24(%rsp), %rdi
> +       leaq    64(%rsp), %rdi
>         call   
> _ZN10extensions9Extension6CreateERKN4base8FilePathENS_8Manifest8LocationERKNS
> 1_15DictionaryValueEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS
> F_@PLT
>         movq    32(%rsp), %r13
>         popq    %rax
> 
> When I change "leaq 64(%rsp), %rdi" back to "movq 24(%rsp), %rdi"
> chromium runs fine.

Thanks.  I reproduced the bug and started to work on it.  The problem is in
rematerialization when FP-SP offset is different at points of original insn and
rematerialized insn.  I hope the patch will be ready tomorrow.

Reply via email to