This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/60116] [4.8/4.9 Regression] wrong code at -Os on x86_64-linux-gnu in 32-bit mode
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 16:47:58 +0000
- Subject: [Bug rtl-optimization/60116] [4.8/4.9 Regression] wrong code at -Os on x86_64-linux-gnu in 32-bit mode
- Auto-submitted: auto-generated
- References: <bug-60116-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60116
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org,
| |law at gcc dot gnu.org
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, what happens is that we have:
(insn 39 38 41 5 (set (reg:QI 119)
(const_int 1 [0x1])) pr60116.c:17 93 {*movqi_internal}
(expr_list:REG_DEAD (reg:CCZ 17 flags)
(nil)))
(insn 41 39 83 5 (set (reg:CCZ 17 flags)
(compare:CCZ (reg:SI 101 [ D.1460 ])
(const_int 0 [0]))) pr60116.c:18 3 {*cmpsi_ccno_1}
(nil))
(insn 83 41 42 5 (set (reg:SI 122 [ D.1465 ])
(zero_extend:SI (reg:QI 119))) 138 {*zero_extendqisi2}
(expr_list:REG_DEAD (reg:QI 119)
(nil)))
(the REG_DEAD on flags on the first insn supposedly comes from earlier
combining.
try_combine is then called on i3=insn83 and i2=insn39 and manages to combine
insn 83 into (set (reg:SI 122) (const_int 1 [0x1])).
The problem is when distribute_notes attempts to distribute the REG_DEAD
(reg:CCZ 17 flags) note from elim_i2=insn39 to i3=insn83.