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

Navya <navyadeepika.garakapati at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |navyadeepika.garakapati@gma
                   |                            |il.com

--- Comment #2 from Navya <navyadeepika.garakapati at gmail dot com> ---
Testcase:
$cat test.c
int foo(long *p)
{
return *p;
}

$cat test.s
foo:
        movq    (%rdi), %rax
        retq

While analysing it found that, in gcc trunck with -O0 optimization,

In ira pass, there is a conversion information from 64bit to 32bit 
subreg:SI (reg:DI 82 [ _1 ]) 0)): 

ira pass:

(insn 8 7 11 2 (set (reg:SI 83 [ _4 ])
        (subreg:SI (reg:DI 82 [ _1 ]) 0)) "t.c":3:8 67 {*movsi_internal}
     (expr_list:REG_DEAD (reg:DI 82 [ _1 ])
        (nil)))

while reload pass is deleting this information and assigning 32bit to 32bit
i.e; SI to SI which results this as a dead code for the next pass and as a
result this insn 8 is getting deleted in next pass which is split2 pass.

reload pass:

(insn 8 7 15 2 (set (reg:SI 0 ax [orig:83 _4 ] [83])
        (reg:SI 0 ax [orig:82 _1 ] [82])) "t.c":3:8 67 {*movsi_internal}
     (nil))

please let us know if there is any target hook being used, because of which the
conversion information from DI to SI is converted to SI to SI in reload pass.

Reply via email to