This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36135] GCC creates suboptimal ASM : suboptimal Adressing-Modes used
- From: "gunnar at greyhound-data dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2008 14:34:42 -0000
- Subject: [Bug target/36135] GCC creates suboptimal ASM : suboptimal Adressing-Modes used
- References: <bug-36135-16150@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from gunnar at greyhound-data dot com 2008-06-12 14:34 -------
Andreas,
What is your opinion to this?
GCC 2.9 used to combine the move with increment in the combine step to
something like this:
***
(insn 32 30 33 (set (reg/v:SI 32)
(mem:SI (post_inc:SI (reg/v:SI 34)) 0)) 42 {movsi+1} (nil)
(expr_list:REG_INC (reg/v:SI 34)
(nil)))
***
So problem is that now GCC seems not to be able to do this anymore by itself
With GCC 4.4 the output is:
**
(insn 34 33 35 4 example2.c:11 (set (reg/v:SI 54 [ value ])
(mem:SI (reg/v/f:SI 52 [ src ]) [2 S4 A16])) 37 {*movsi_cf} (nil))
(insn 35 34 36 4 example2.c:12 (set (reg/v:SI 53 [ value2 ])
(mem:SI (plus:SI (reg/v/f:SI 52 [ src ])
(const_int 4 [0x4])) [2 S4 A16])) 37 {*movsi_cf} (nil))
(insn 36 35 38 4 example2.c:5 (set (reg/v/f:SI 52 [ src ])
(plus:SI (reg/v/f:SI 52 [ src ])
(const_int 8 [0x8]))) 133 {*addsi3_5200} (nil))
(insn 38 36 40 4 example2.c:10 (set (reg/v:SI 50 [ size.21 ])
(plus:SI (reg/v:SI 50 [ size.21 ])
(const_int -1 [0xffffffff]))) 133 {*addsi3_5200} (nil))
***
Any ideas about this?
Kind regards
Gunnar von Boehn
--
gunnar at greyhound-data dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schwab at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36135