On Tue, Mar 18, 2014 at 7:13 AM, Richard Biener
<richard.guent...@gmail.com> wrote:
> extern __inline __m512
> __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> _mm512_undefined_ps (void)
> {
>   __m512 __Y = __Y;
>   return __Y;
> }


This provokes no warnings (as you wrote) and it doesn't clobber flags,
but it doesn't avoid loading.  The code below creates a pxor for the
parameter.  That's what I think compiler support should help to get
rid of.  If the compiler has some magic to recognize -1 masks then
this will help in some situations but it seems to be a specific
implementation for the intrinsics while I've been looking at generic
solution.


typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__));

void g(__m128d);

extern __inline __m128d
__attribute__((__gnu_inline__, __always_inline__, __artificial__, const))
_mm_undefined_pd(void) {
  __m128d v = v;
  return v;
}

void
f()
{
  g(_mm_undefined_pd());
}

Reply via email to