[Bug middle-end/71310] Bitfields cause load hit store with smaller store and larger load

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 9 21:17:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71310

--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Well, the code for picking the representative already has computed
the maximum size allowable under the C++11 model there (in maxbitsize).
But this loop always picks the smallest it can.  That probably is not
such a bad choice.

For e.g. a bitfield of 32 bits followed by some other 32-bit it has
maxbitsize = 32, but the BIT_FIELD_REF still does 64,64, which does
not create wrong code but just very slow code (not sure if it's
invalid under the memory model, the "extra" bits read are unused
always).

I'll try your optimize_bit_field idea.


More information about the Gcc-bugs mailing list