On Fri, Oct 17, 2014 at 4:54 PM, Richard Sandiford
<richard.sandif...@arm.com> wrote:
> Undo the original fix for 61630 and use preferred_for_speed in the
> problematic pattern.
>
> I've not written many gcc.target/i386 tests so the markup might need
> some work.
>
> Richard
>
>
> gcc/
>         * lra.c (lra): Remove call to recog_init.
>         * config/i386/i386.md (preferred_for_speed): New attribute
>         (*float<SWI48:mode><MODEF:mode>2_sse): Override it instead of
>         "enabled".
>
> gcc/testsuite/
>         * gcc.target/i386/conversion-2.c: New test.

Please use the attached testcase that is also compatible with 32bit
compiles (and removes unnecessary comments in the asm). Please also
mention the revert  in ChangeLog.

OK for x86 part with these changes.

Thanks,
Uros.
/* { dg-do compile } */
/* { dg-options "-O2 -fno-toplevel-reorder -mtune=bdver2" } */
/* { dg-additional-options "-mregparm=1 -msse -mfpmath=sse" { target ia32 } } */

void __attribute__ ((hot))
f1 (int x)
{
  register float f asm ("%xmm0") = x;
  asm volatile ("" :: "x" (f));
}

void __attribute__ ((cold))
f2 (int x)
{
  register float f asm ("%xmm1") = x;
  asm volatile ("" :: "x" (f));
}

void __attribute__ ((hot))
f3 (int x)
{
  register float f asm ("%xmm2") = x;
  asm volatile ("" :: "x" (f));
}

void __attribute__ ((cold))
f4 (int x)
{
  register float f asm ("%xmm3") = x;
  asm volatile ("" :: "x" (f));
}

/* { dg-final { scan-assembler "sp\\\), %xmm0" } } */
/* { dg-final { scan-assembler "(ax|di), %xmm1" } } */
/* { dg-final { scan-assembler "sp\\\), %xmm2" } } */
/* { dg-final { scan-assembler "(ax|di), %xmm3" } } */

Reply via email to