[Bug target/67609] [5/6 Regression] Generates wrong code for SSE2 _mm_load_pd
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 17 13:13:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
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.
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.
More information about the Gcc-bugs
mailing list