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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-03-14
     Ever confirmed|0                           |1

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
The instruction is removed by LRA, something with inheritance.


We have

(insn 16 13 17 2 (set (reg:DF 4 4)
        (unspec_volatile:DF [
                (const_int 0 [0])
            ] UNSPECV_MFFS)) "pr89721.c":14:9 931 {rs6000_mffs}
     (nil))

and then some code including a call, and then

(insn 23 20 24 2 (set (reg:DF 4 4)
        (unspec_volatile:DF [
                (const_int 0 [0])
            ] UNSPECV_MFFS)) "pr89721.c":17:9 931 {rs6000_mffs}
     (nil))


LRA does the following to these: (this is powerpc64-linux, default subtarget):

         Choosing alt 0 in insn 16:  (0) =d {rs6000_mffs}
      Creating newreg=133 from oldreg=4, assigning class FLOAT_REGS to r133
   16: r133:DF=unspec/v[0] 8
    Inserting insn reload after:
   36: %4:DF=r133:DF

      Creating newreg=134, assigning class NO_REGS to secondary r134
   36: r134:DF=r133:DF
    Inserting the sec. move after:
   37: %4:DF=r134:DF

         Choosing alt 0 in insn 23:  (0) =d {rs6000_mffs}
      Creating newreg=135 from oldreg=4, assigning class FLOAT_REGS to r135
   23: r135:DF=unspec/v[0] 8
    Inserting insn reload after:
   38: %4:DF=r135:DF

      Creating newreg=136, assigning class NO_REGS to secondary r136
   38: r136:DF=r135:DF
    Inserting the sec. move after:
   39: %4:DF=r136:DF

********** Inheritance #1: **********

EBB 2
    [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
      Creating newreg=137 from oldreg=133, assigning class FLOAT_REGS to
invariant inheritance r137
   16: r133:DF=unspec/v[0] 8
    Add invariant inheritance<-original after:
   40: r137:DF=r133:DF

   23: r135:DF=unspec/v[0] 8
    Changing reload<-inheritance after:
   41: r135:DF=r137:DF

deleting insn with uid = 23.
    Invariant inheritance reuse change 137 (bb2):
   23: NOTE_INSN_DELETED
          ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]


... and the damage is done.

Reply via email to