This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/58546] volatile bug and also larger code at -Os
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Sep 2013 22:48:40 +0000
- Subject: [Bug target/58546] volatile bug and also larger code at -Os
- Auto-submitted: auto-generated
- References: <bug-58546-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58546
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a target specific issue as the RTL looks fine from expand:
;; c_I_lsm.5_11 = c[6];
(insn 30 29 31 (set (reg/f:DI 94)
(const:DI (plus:DI (symbol_ref:DI ("c") [flags 0x2] <var_decl
0x7f865aabf390 c>)
(const_int 12 [0xc])))) -1
(nil))
(insn 31 30 0 (set (reg:HI 86 [ c_I_lsm.5 ])
(mem/c:HI (reg/f:DI 94) [2 c+12 S2 A32])) -1
(nil))
It is ok even until after reload (in older 4.9):
(insn 40 63 64 2 (parallel [
(set (reg:HI 2 cx [orig:98 D.1755 ] [98])
(plus:HI (reg:HI 2 cx [orig:98 D.1755 ] [98])
(mem/c:HI (const:DI (plus:DI (symbol_ref:DI ("c") [flags
0x2] <var_decl 0x7f865aabf390 c>)
(const_int 12 [0xc]))) [2 c+12 S2 A32])))
(clobber (reg:CC 17 flags))
]) 263 {*addhi_1}
(nil))
---- CUT ----
It produces an SI mode during split after register allocation:
(insn 68 63 61 2 (parallel [
(set (reg:SI 2 cx [orig:98 D.1755 ] [98])
(plus:SI (reg:SI 2 cx [orig:98 D.1755 ] [98])
(mem/c:SI (const:DI (plus:DI (symbol_ref:DI ("c") [flags
0x2] <var_decl 0x7fe45464c390 c>)
(const_int 12 [0xc]))) [2 c+12 S4 A32])))
(clobber (reg:CC 17 flags))
]) 260 {*addsi_1}
(nil))