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/80301] Sub-optimal code with an array of structs offsetted inside a struct global on x86/x86_64 at -O2


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

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #2)
> So we fail to combine/fwprop

Because r92 is used in two BBs:

    9: {r92:DI=r91:DI+0x2;clobber flags:CC;}
      REG_DEAD r91:DI
      REG_UNUSED flags:CC
    4: r88:SI=r89:SI
      REG_DEAD r89:SI
   10: flags:CCZ=cmp([r92:DI*0x8+`m'],r88:SI)
   11: pc={(flags:CCZ==0)?L21:pc}
      REG_DEAD flags:CCZ
      REG_BR_PROB 3050
   12: NOTE_INSN_BASIC_BLOCK 3
   16: r88:SI=[r92:DI*0x8+const(`m'+0x4)]
      REG_DEAD r92:DI

So, combine would need to distribute +2 from (insn 9) to two different
consumers, (insn 10) and (insn 16).

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