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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, from what I can see, the problem is that we have during IRA:
(insn 48 47 49 6 (parallel [
            (set (reg:DI 93 [ D.2201 ])
                (sign_extend:DI (reg/v:SI 88 [ b ])))
            (clobber (reg:CC 17 flags))
            (clobber (scratch:SI))
        ]) pr65032.C:79 143 {extendsidi2_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
(insn 50 93 51 6 (parallel [
            (set (reg:DI 111 [ D.2201 ])
                (neg:DI (reg:DI 93 [ D.2201 ])))
            (clobber (reg:CC 17 flags))
        ]) pr65032.C:79 450 {*negdi2_doubleword}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
and LRA turns this into:
(insn 48 47 49 6 (parallel [
            (set (mem/c:DI (plus:SI (reg/f:SI 7 sp)
                        (const_int 8 [0x8])) [13 %sfp+-24 S8 A64])
                (sign_extend:DI (reg/v:SI 5 di [orig:88 b ] [88])))
            (clobber (reg:CC 17 flags))
            (clobber (reg:SI 0 ax [118]))
        ]) pr65032.C:79 143 {extendsidi2_1}
     (nil))
(insn 104 93 101 6 (parallel [
            (set (reg:DI 0 ax [orig:111 D.2201 ] [111])
                (sign_extend:DI (reg/v:SI 5 di [orig:88 b ] [88])))
            (clobber (reg:CC 17 flags))
            (clobber (reg:SI 118))
        ]) pr65032.C:79 143 {extendsidi2_1}
     (nil))
(insn 50 101 102 6 (parallel [
            (set (reg:DI 0 ax [orig:111 D.2201 ] [111])
                (neg:DI (reg:DI 0 ax [orig:111 D.2201 ] [111])))
            (clobber (reg:CC 17 flags))
        ]) pr65032.C:79 450 {*negdi2_doubleword}
     (nil))
and the problem is the (clobber (reg:SI 118)) kept in the IL.  The constraint
for it there is "=X", but despite that accepting anything, postreload really
doesn't like pseudos kept around in the instructions.
Dunno if (scratch:SI) instead would be still acceptable post-reload, or if we
need some other way to express we really don't care about the clobber (the insn
will be split during split2 pass).

Reply via email to