This is the mail archive of the gcc@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: Reload bug


> For 3.2 it is probably OK to simply revert the patch
> after all.  I can do so if maintainer approves that.

Thanks. Please mention the reference (PR optimization/10233) in the ChangeLog 
entry. I've attached a testcase gcc.dg/i386-mmx-3.c .

> I just want to be sure that for 3.3/3.4 it is dealt correct that I am
> not quite certain about at this point :((

Perhaps instrument the code to see if invalid subregs reach the logic that 
would have triggered before your patch.

-- 
Eric Botcazou
/* PR optimization/10233 */
/* Originator: <dean-gcc at arctic dot org> */
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-std=c99 -O3 -mmmx" } */

#include <mmintrin.h>

extern void abort(void);

typedef union {
  unsigned long long uq[1];
  __m64 m;
} mm_t __attribute__((aligned(8)));

static int foo(mm_t *p, const mm_t *q)
{
  mm_t t;

  t.m = _mm_slli_pi16(p->m, 1);
  return t.uq[0] == q->uq[0];
}

int main(void)
{
   mm_t m1, m2;

   m1.uq[0] = 0x4001800180018001ULL;
   m2.uq[0] = 0x0002000200020002ULL;

   if (foo(&m1, &m2))
      abort();

   return 0;
}

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