OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [xop-pcmov2.c] - Diff between revs 318 and 338

Only display areas with differences | Details | Blame | View Log

Rev 318 Rev 338
/* Test that the compiler properly optimizes conditional floating point moves
/* Test that the compiler properly optimizes conditional floating point moves
   into the pcmov instruction on XOP systems.  */
   into the pcmov instruction on XOP systems.  */
 
 
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2 -mxop" } */
/* { dg-options "-O2 -mxop" } */
 
 
extern void exit (int);
extern void exit (int);
 
 
float flt_test (float a, float b, float c, float d)
float flt_test (float a, float b, float c, float d)
{
{
  return (a > b) ? c : d;
  return (a > b) ? c : d;
}
}
 
 
float flt_a = 1, flt_b = 2, flt_c = 3, flt_d = 4, flt_e;
float flt_a = 1, flt_b = 2, flt_c = 3, flt_d = 4, flt_e;
 
 
int main()
int main()
{
{
  flt_e = flt_test (flt_a, flt_b, flt_c, flt_d);
  flt_e = flt_test (flt_a, flt_b, flt_c, flt_d);
  exit (0);
  exit (0);
}
}
 
 
/* { dg-final { scan-assembler "vpcmov" } } */
/* { dg-final { scan-assembler "vpcmov" } } */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.