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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [ppc-fsel-2.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target powerpc*-*-* } } */
2
/* { dg-options "-O -mpowerpc-gfxopt -g0 -ffinite-math-only" } */
3
/* { dg-final { scan-assembler-not "^L" } } */
4
 
5
/* Every single one of these should be compiled into straight-line
6
   code using fsel (or, in a few cases, hardwired to 'true' or
7
   'false'), no branches anywhere.  */
8
 
9
double
10
test_isunordered(double x, double y, double a, double b)
11
{
12
  return __builtin_isunordered(x, y) ? a : b;
13
}
14
 
15
double
16
test_not_isunordered(double x, double y, double a, double b)
17
{
18
  return !__builtin_isunordered(x, y) ? a : b;
19
}
20
 
21
double
22
test_isless(double x, double y, double a, double b)
23
{
24
  return __builtin_isless(x, y) ? a : b;
25
}
26
 
27
double
28
test_not_isless(double x, double y, double a, double b)
29
{
30
  return !__builtin_isless(x, y) ? a : b;
31
}
32
 
33
double
34
test_islessequal(double x, double y, double a, double b)
35
{
36
  return __builtin_islessequal(x, y) ? a : b;
37
}
38
 
39
double
40
test_not_islessequal(double x, double y, double a, double b)
41
{
42
  return !__builtin_islessequal(x, y) ? a : b;
43
}
44
 
45
double
46
test_isgreater(double x, double y, double a, double b)
47
{
48
  return __builtin_isgreater(x, y) ? a : b;
49
}
50
 
51
double
52
test_not_isgreater(double x, double y, double a, double b)
53
{
54
  return !__builtin_isgreater(x, y) ? a : b;
55
}
56
 
57
double
58
test_isgreaterequal(double x, double y, double a, double b)
59
{
60
  return __builtin_isgreaterequal(x, y) ? a : b;
61
}
62
 
63
double
64
test_not_isgreaterequal(double x, double y, double a, double b)
65
{
66
  return !__builtin_isgreaterequal(x, y) ? a : b;
67
}
68
 
69
double
70
test_islessgreater(double x, double y, double a, double b)
71
{
72
  return __builtin_islessgreater(x, y) ? a : b;
73
}
74
 
75
double
76
test_not_islessgreater(double x, double y, double a, double b)
77
{
78
  return !__builtin_islessgreater(x, y) ? a : b;
79
}
80
 

powered by: WebSVN 2.1.0

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