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

--- Comment #4 from UroŇ° Bizjak <ubizjak at gmail dot com> ---
cse1 pass of gcc-7 converts several insns (15,16,19,24) in BB4 from:

   12: L12:
   13: NOTE_INSN_BASIC_BLOCK 4
   14: flags:CCFPU=cmp(r89:DF,r90:DF)
   15: r96:QI=ordered(flags:CCFPU,0)
   16: r95:SI=zero_extend(r96:QI)
   18: r97:SI=0
   17: flags:CCFPU=cmp(r89:DF,r90:DF)
   19: r92:SI={(uneq(flags:CCFPU,0))?r95:SI:r97:SI}
   20: r88:SI=r92:SI
   24: ax:SI=r88:SI
   25: use ax:SI

to:

   12: L12:
   13: NOTE_INSN_BASIC_BLOCK 4
   14: flags:CCFPU=cmp(r89:DF,r90:DF)
   15: r96:QI=0x1
      REG_DEAD flags:CCFPU
   16: r95:SI=0x1
      REG_DEAD r96:QI
   18: r97:SI=0
   17: flags:CCFPU=cmp(r89:DF,r90:DF)
      REG_DEAD r90:DF
      REG_DEAD r89:DF
   19: r92:SI=uneq(flags:CCFPU,0)
      REG_DEAD r97:SI
      REG_DEAD r95:SI
      REG_DEAD flags:CCFPU
   20: r88:SI=r92:SI
      REG_DEAD r92:SI
   24: ax:SI=r92:SI
      REG_DEAD r88:SI
   25: use ax:SI

cse2 pass later removes (insn 17):

   12: L12:
   13: NOTE_INSN_BASIC_BLOCK 4
   19: r92:SI=uneq(flags:CCFPU,0)
      REG_DEAD flags:CCFPU
   24: ax:SI=r92:SI
      REG_DEAD r92:SI
   25: use ax:SI

For some reason, cse1 pass of gcc-8 converts only (insn 24), leaving:

   12: L12:
   13: NOTE_INSN_BASIC_BLOCK 4
   14: flags:CCFP=unspec[cmp(r89:DF,r90:DF)] 27
   15: r96:QI=ordered(flags:CCFP,0)
      REG_DEAD flags:CCFP
   16: r95:SI=zero_extend(r96:QI)
      REG_DEAD r96:QI
   18: r97:SI=0
   17: flags:CCFP=unspec[cmp(r89:DF,r90:DF)] 27
      REG_DEAD r90:DF
      REG_DEAD r89:DF
   19: r92:SI={(uneq(flags:CCFP,0))?r95:SI:r97:SI}
      REG_DEAD r97:SI
      REG_DEAD r95:SI
      REG_DEAD flags:CCFP
   20: r88:SI=r92:SI
      REG_DEAD r92:SI
   24: ax:SI=r92:SI
      REG_DEAD r88:SI
   25: use ax:SI

Reply via email to