[Bug rtl-optimization/17104] Non-optimal code generation for bitfield initialization

dje at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Sep 13 17:37:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list