https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121405
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
<bb 2> :
MEM <unsigned char> [(struct vec_char_16 *)&D.3024] = t0_7(D);
MEM <unsigned char> [(struct vec_char_16 *)&D.3024 + 1B] = t1_8(D);
a_20 = MEM[(struct vec_char_16 *)&D.3024];
MEM <unsigned short> [(char * {ref-all})&b] = a_20;
_15 = BIT_FIELD_REF <a_20, 8, 0>;
So this isn't a "copy", but rather what we miss is to record a value
for the compound load by MEM[(struct vec_char_16 *)&D.3024]. I do
have some old patches that build up a { t0_7(D), t1_8(D) } CTOR,
marked for insertion and value-number to that. With this
BIT_FIELD_REF folding on that should work. But I chickened out
because actually inserting such CTOR isn't always profitable.
We do this dance for vector constants.