This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch (x86 SSE2): wrong code for movhlps



On Dec 2, 2005, at 3:50 PM, Andrew Pinski wrote:


/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse2" } */
#include <xmmintrin.h>
extern void abort();
int untrue = 0;
void foo (__v4sf, __v4sf) __attribute__((noinline));
void foo (__v4sf a, __v4sf b) {
  float * fp = (float *)&b;

Aren't you violating C aliasing rules here? I would use an union like all other vector tests do.

You're right. Actually this patch isn't right anyway, I need to look at it more.

  if (fp[0] != 7.0 || fp[1] != 8.0 || fp[2] != 3.0 || fp[3] != 4.0)
    abort();

Thanks, Andrew Pinski



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]