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] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* Test that the compiler properly optimizes conditional floating point moves
2
   into the pcmov instruction on XOP systems.  */
3
 
4
/* { dg-do compile } */
5
/* { dg-require-effective-target lp64 } */
6
/* { dg-options "-O2 -mxop" } */
7
 
8
extern void exit (int);
9
 
10
float flt_test (float a, float b, float c, float d)
11
{
12
  return (a > b) ? c : d;
13
}
14
 
15
float flt_a = 1, flt_b = 2, flt_c = 3, flt_d = 4, flt_e;
16
 
17
int main()
18
{
19
  flt_e = flt_test (flt_a, flt_b, flt_c, flt_d);
20
  exit (0);
21
}
22
 
23
/* { 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.