This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28001] incrementing a variable produces smaller code than an explicit assignment
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2006 18:43:48 -0000
- Subject: [Bug target/28001] incrementing a variable produces smaller code than an explicit assignment
- References: <bug-28001-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-06-12 18:43 -------
The reason why increment is smaller is because the inc instruction is smaller
than loading a constant.
This is a target specific optimization as most other targets, it is going to be
about the same.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Component|middle-end |target
Ever Confirmed|0 |1
GCC build triplet|i386-linux-gnu |
GCC host triplet|i386-linux-gnu |
GCC target triplet|i386-linux-gnu |i?86-*-*
Last reconfirmed|0000-00-00 00:00:00 |2006-06-12 18:43:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28001