This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/38495] ACATS tests cxa4004 cxa4005 cxa4026 fail



------- Comment #4 from ebotcazou at gcc dot gnu dot org  2008-12-17 17:35 -------
Vlad, I'd again need your help for this one, it's apparently a stack slot
sharing problem.  Ada testcase and instructions have been filed.

The problematic excerpt of assembly is:

        movl    %esi, -28(%ebp) #, %sfp        -28(%ebp) <--- tfirst_fpad
        subl    $1, %esi        #, q__move__B_4__L_5__T90b___U
        cmpl    %esi, %eax      # q__move__B_4__L_5__T90b___U, i
        jg      .L53    #,
        movzbl  -57(%ebp), %ebx # %sfp,
        movl    -36(%ebp), %esi # %sfp,
        movb    %bl, (%esi)     #,
        je      .L53    #,
        leal    1(%eax), %ebx   #,
        addl    $1, %esi        #, ivtmp.268
        movl    %ecx, -52(%ebp) # j, %sfp
        movl    %ebx, %ecx      #, ivtmp.266
        movzbl  -57(%ebp), %ebx # %sfp,
        movl    %edi, -48(%ebp) # prephitmp.345, %sfp
        movl    -28(%ebp), %edi # %sfp, tfirst_fpad
        movl    %eax, -44(%ebp) # i, %sfp
        movl    %esi, %eax      # ivtmp.268, ivtmp.268
        movl    %edx, %esi      # tlast.59, tlast.59
        movb    %bl, -40(%ebp)  #, %sfp
        movl    -64(%ebp), %ebx # %sfp, source
        movzbl  -40(%ebp), %edx # %sfp, pad
        .p2align 4,,7
        .p2align 3
.L54:
        addl    $1, %ecx        #, ivtmp.266
        movb    %dl, (%eax)     # pad,* ivtmp.268
        addl    $1, %eax        #, ivtmp.268
        cmpl    %edi, %ecx      # tfirst_fpad, ivtmp.266
        jne     .L54    #,
        movb    %dl, -28(%ebp)  # pad, %sfp      -28(%ebp) <--- pad
        movl    -48(%ebp), %edi # %sfp, prephitmp.345
        movl    %esi, %edx      # tlast.59, tlast.59
        movl    %ebx, -64(%ebp) # source, %sfp
        movzbl  -28(%ebp), %ebx # %sfp,
        movl    -52(%ebp), %ecx # %sfp, j
        movl    -44(%ebp), %eax # %sfp, i
        movb    %bl, -57(%ebp)  #, %sfp
.L53:
        movl    -28(%ebp), %esi # %sfp,      -28(%ebp) ---> tfirst_fpad

The shared slot is -28(%ebp) and the second line with the <--- overwrites the
value written by the first <--- line, which is needed by the ---> line.

If you change the second line to make it use -57(%ebp), with proper reloading
a few lines below, the test passes.


The problematic insn is

insn 1086 1085 1087 127 (set (mem/c:QI (plus:SI (reg/f:SI 6 bp)
                (const_int -28 [0xffffffe4])) [13 %sfp+-4 S1 A32])
        (reg/v:QI 1 dx [orig:192 pad ] [192])) 50 {*movqi_1} (nil))

which originally was

(insn 1086 0 0 (set (reg/v:QI 452 [orig:192 pad ] [192])
        (reg/v:QI 344 [orig:192 pad ] [192])) -1 (nil))

so the problematic pseudo seems to be 452:

scanning new insn with uid = 1082.
      Creating newreg=452 from oldreg=192
    Creating temporary allocno a379r452

and I'm under the impression that it's wrongly coalesced to pseudo 275:

      Coalescing spilled allocnos a379r452->a39r275


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38495


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]