This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/17104] Non-optimal code generation for bitfield initialization
- From: "dje at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2004 17:37:11 -0000
- Subject: [Bug rtl-optimization/17104] Non-optimal code generation for bitfield initialization
- References: <20040819145911.17104.steinmtz@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dje at gcc dot gnu dot org 2004-09-13 17:37 -------
Is the compiler really free to do much better? XLC seems to produce slightly
more efficient, but generally similarly large amount of code for the assignment.
The problem is that struct is an int -- 32 bits -- not an entire GPR in 64-bit
mode. One ends up with a partial register -- only part of the register defined.
If the struct is defined as a bitfield of "long int", the 64-bit code is
compact and essentially equivalent to the 32-bit version. This may not be a
missed optimization.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17104