This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Dec 2012 12:32:24 +0000
- Subject: [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
- Auto-submitted: auto-generated
- References: <bug-55006-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006
--- Comment #14 from Steven Bosscher <steven at gcc dot gnu.org> 2012-12-05 12:32:24 UTC ---
Nothing new here, just yet another invalid REG_EQUAL note:
The webizer tries to split r51 in this insn:
;; basic block 4, loop depth 0, count 0, freq 7100, maybe hot
;; prev block 3, next block 5, flags: (REACHABLE, RTL, MODIFIED)
;; pred: 2 [71.0%]
;; bb 4 artificial_defs: { }
;; bb 4 artificial_uses: { u20(11){ }u21(15){ }u22(32){ }u23(34){ }}
;; lr in 11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; lr use 11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; lr def 48 50
;; live in 11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; live gen 48 50
;; live kill
(code_label 38 6 37 4 4 "" [1 uses])
(note 37 38 58 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
(insn 58 37 5 4 (set (reg:SI 50 [ D.1400 ])
(reg:SI 55 [ D.1400 ])) 67 {*movsi_zarch}
(expr_list:REG_EQUAL (mem:SI (plus:DI (reg/v/f:DI 51 [ line ])
(const_int 12 [0xc])) [4 line_4(D)->sv_flags+0 S4 A32])
(nil)))
Web oldreg=51 newreg=56
Updating insn 58 (51->56)
But r51 is not live on entry to bb4, and not defined in bb4 before insn58, so
it's a REG_EQUAL use of a dead register.
The sole DEF or r51 is a parameter load, and r55 is set almost immediately
after it:
(note 7 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 2 7 3 2 (set (reg/v/f:DI 51 [ line ])
(reg:DI 2 %r2 [ line ])) t.c:25 63 {*movdi_64}
(nil))
(note 3 2 9 2 NOTE_INSN_FUNCTION_BEG)
(insn 9 3 10 2 (set (mem/f/c:DI (symbol_ref:DI ("PL_linestr") [flags 0x40]
<var_decl 0x3fff74f65f0 PL_linestr>) [2 PL_linestr+0 S8 A64])
(reg/v/f:DI 51 [ line ])) t.c:28 63 {*movdi_64}
(nil))
(insn 10 9 11 2 (set (reg:SI 55 [ D.1400 ])
(mem:SI (plus:DI (reg/v/f:DI 51 [ line ])
(const_int 12 [0xc])) [4 line_4(D)->sv_flags+0 S4 A32])) t.c:29
67 {*movsi_zarch}
(nil))
r51 dies in in insn 10.