This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]