https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #3) > The doc says: > > When used as an lvalue, 'subreg' is a word-based accessor. > Storing to a 'subreg' modifies all the words of REG that > overlap the 'subreg', but it leaves the other words of REG > alone. But UNITS_PER_WORD is 8 so (subreg:DF (TI)) should leave the upper half of the TImode register unchanged. > When storing to a normal 'subreg' that is smaller than a word, > the other bits of the referenced word are usually left in an > undefined state. This laxity makes it easier to generate > efficient code for such instructions. To represent an > instruction that preserves all the bits outside of those in > the 'subreg', use 'strict_low_part' or 'zero_extract' around > the 'subreg'. > > However, we expand assignment to v[0] with: > > ;; v[0] = b_4(D); > > (insn 7 6 0 (set (subreg:DF (reg/v:TI 90 [ v ]) 0) > (reg/v:DF 88 [ b ])) pr67609.c:8 -1 > (nil)) > > According to the above explanation, a strict_low_part should be used here. > > I think this is middle-end, not a target problem.