This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/80301] Sub-optimal code with an array of structs offsetted inside a struct global on x86/x86_64 at -O2
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Apr 2017 08:07:54 +0000
- Subject: [Bug rtl-optimization/80301] Sub-optimal code with an array of structs offsetted inside a struct global on x86/x86_64 at -O2
- Auto-submitted: auto-generated
- References: <bug-80301-4@http.gcc.gnu.org/bugzilla/>
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).