This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/38272] [4.4 Regression] Revision 142207 caused libgomp.fortran/threadprivate2.f90
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2008 19:01:57 -0000
- Subject: [Bug rtl-optimization/38272] [4.4 Regression] Revision 142207 caused libgomp.fortran/threadprivate2.f90
- References: <bug-38272-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from hjl dot tools at gmail dot com 2008-11-28 19:01 -------
With patch for PR 38280:
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01428.html
IRA generates:
Reloads for insn # 151
Reload 0: reload_in (SI) = (mem/u/c:SI (const:SI (unspec:SI [
(symbol_ref:SI
("__threadprivate2_MOD_foo") [flags 0x60] <var_decl 0x7ffe1895f780 foo>)
] 8)) [0 S4 A8])
GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1), optional
reload_in_reg: (mem/u/c:SI (const:SI (unspec:SI [
(symbol_ref:SI
("__threadprivate2_MOD_foo") [flags 0x60] <var_decl 0x7ffe1895f780 foo>)
] 8)) [0 S4 A8])
reload_reg_rtx: (reg:SI 2 cx [80])
Reloads for insn # 48
Reload 0: reload_out (SI) = (reg:SI 63 [ D.2018 ])
GENERAL_REGS, RELOAD_FOR_OUTPUT (opnum = 0)
reload_out_reg: (reg:SI 63 [ D.2018 ])
reload_reg_rtx: (reg:SI 1 dx)
Reload 1: reload_in (SI) = (mem/s/j:SI (plus:SI (plus:SI (unspec:SI [
(const_int
0 [0x0])
] 18)
(reg:SI 1 dx [87]))
(const_int 24 [0x18]))
[0 <variable>.stride+0 S4 A32])
GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1), optional
reload_in_reg: (mem/s/j:SI (plus:SI (plus:SI (unspec:SI [
(const_int
0 [0x0])
] 18)
(reg:SI 1 dx [87]))
(const_int 24 [0x18]))
[0 <variable>.stride+0 S4 A32])
Reloads for insn # 49
Reload 0: reload_in (SI) = (reg:SI 63 [ D.2018 ])
reload_out (SI) = (reg:SI 1 dx [orig:62 D.2019 ] [62])
GENERAL_REGS, RELOAD_OTHER (opnum = 0)
reload_in_reg: (reg:SI 63 [ D.2018 ])
reload_out_reg: (reg:SI 1 dx [orig:62 D.2019 ] [62])
reload_reg_rtx: (reg:SI 1 dx [orig:62 D.2019 ] [62])
Reload 1: reload_in (SI) = (reg:SI 65 [ ivtmp.93 ])
GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 2), optional
reload_in_reg: (reg:SI 65 [ ivtmp.93 ])
reload_reg_rtx: (reg:SI 2 cx [80])
...
(insn 151 47 48 3 /tmp/foo.f90:6 (set (reg:SI 1 dx [87])
(reg:SI 2 cx [80])) 47 {*movsi_1} (expr_list:REG_EQUIV (mem/u/c:SI
(const:SI (unspec:SI [
(symbol_ref:SI ("__threadprivate2_MOD_foo") [flags
0x60] <var_decl 0x7ffe1895f780 foo>)
] 8)) [0 S4 A8])
(nil)))
(insn 48 151 167 3 /tmp/foo.f90:6 (set (reg:SI 1 dx)
(mem/s/j:SI (plus:SI (plus:SI (unspec:SI [
(const_int 0 [0x0])
] 18)
(reg:SI 1 dx [87]))
(const_int 24 [0x18])) [0 <variable>.stride+0 S4 A32])) 47
{*movsi_1} (nil))
(insn 167 48 168 3 /tmp/foo.f90:6 (set (mem/c:SI (plus:SI (reg/f:SI 6 bp)
(const_int -56 [0xffffffffffffffc8])) [0 %sfp+-32 S4 A32])
(reg:SI 1 dx)) 47 {*movsi_1} (nil))
(insn 168 167 49 3 /tmp/foo.f90:6 (set (reg:SI 1 dx [orig:62 D.2019 ] [62])
(mem/c:SI (plus:SI (reg/f:SI 6 bp)
(const_int -56 [0xffffffffffffffc8])) [0 %sfp+-32 S4 A32])) 47
{*movsi_1} (nil))
(insn 49 168 50 3 /tmp/foo.f90:6 (parallel [
(set (reg:SI 1 dx [orig:62 D.2019 ] [62])
(mult:SI (reg:SI 1 dx [orig:62 D.2019 ] [62])
(reg:SI 2 cx [80])))
(clobber (reg:CC 17 flags))
]) 333 {*mulsi3_1} (nil))
Something is wrong here. ECX can't be both
(symbol_ref:SI ("__threadprivate2_MOD_foo") [flags 0x60] <var_decl
0x7ffe1895f780 foo>)
and (reg:SI 65 [ ivtmp.93 ]) at the same time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38272