This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: aliasing revisited
Brian Budge <brian.budge@gmail.com> writes:
> simd4f is a wrapper on __m128, and "m_leftRep" is an array of
> uint32_t. I realize that I could just create a simd4f array for "c",
> perform the first loop, and then put a union in the second loop. This
> would require at least one extra write per uint32_t though. Is there
> any way of specifying that "c" aliases "m_leftRep"? Or am I stuck
> with the union?
I don't know if this answers your question, because I don't know
precisely what you mean by a wrapper, but note that __m128 is magical: a
pointer to __m128 is permitted to alias other pointers. This is
essentially required by the Intel docs. It is implemented by giving
__m128 the "may_alias" attribute, q.v.
Ian