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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [fma-compile.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test that the compiler properly generates floating point multiply
2
   and add instructions FMA systems.  */
3
 
4
/* { dg-do compile } */
5
/* { dg-options "-O2 -mfma" } */
6
 
7
#include <x86intrin.h>
8
 
9
__m128d
10
check_mm_fmadd_pd (__m128d a, __m128d b, __m128d c)
11
{
12
  return _mm_fmadd_pd (a, b, c);
13
}
14
 
15
__m256d
16
check_mm256_fmadd_pd (__m256d a, __m256d b, __m256d c)
17
{
18
  return _mm256_fmadd_pd (a, b, c);
19
}
20
 
21
__m128
22
check_mm_fmadd_ps (__m128 a, __m128 b, __m128 c)
23
{
24
  return _mm_fmadd_ps (a, b, c);
25
}
26
 
27
__m256
28
check_mm256_fmadd_ps (__m256 a, __m256 b, __m256 c)
29
{
30
  return _mm256_fmadd_ps (a, b, c);
31
}
32
 
33
__m128d
34
check_mm_fmadd_sd (__m128d a, __m128d b, __m128d c)
35
{
36
  return _mm_fmadd_sd (a, b, c);
37
}
38
 
39
__m128
40
check_mm_fmadd_ss (__m128 a, __m128 b, __m128 c)
41
{
42
  return _mm_fmadd_ss (a, b, c);
43
}
44
 
45
__m128d
46
check_mm_fmsub_pd (__m128d a, __m128d b, __m128d c)
47
{
48
  return _mm_fmsub_pd (a, b, c);
49
}
50
 
51
__m256d
52
check_mm256_fmsub_pd (__m256d a, __m256d b, __m256d c)
53
{
54
  return _mm256_fmsub_pd (a, b, c);
55
}
56
 
57
__m128
58
check_mm_fmsub_ps (__m128 a, __m128 b, __m128 c)
59
{
60
  return _mm_fmsub_ps (a, b, c);
61
}
62
 
63
__m256
64
check_mm256_fmsub_ps (__m256 a, __m256 b, __m256 c)
65
{
66
  return _mm256_fmsub_ps (a, b, c);
67
}
68
 
69
__m128d
70
check_mm_fmsub_sd (__m128d a, __m128d b, __m128d c)
71
{
72
  return _mm_fmsub_sd (a, b, c);
73
}
74
 
75
__m128
76
check_mm_fmsub_ss (__m128 a, __m128 b, __m128 c)
77
{
78
  return _mm_fmsub_ss (a, b, c);
79
}
80
 
81
__m128d
82
check_mm_fnmadd_pd (__m128d a, __m128d b, __m128d c)
83
{
84
  return _mm_fnmadd_pd (a, b, c);
85
}
86
 
87
__m256d
88
check_mm256_fnmadd_pd (__m256d a, __m256d b, __m256d c)
89
{
90
  return _mm256_fnmadd_pd (a, b, c);
91
}
92
 
93
__m128
94
check_mm_fnmadd_ps (__m128 a, __m128 b, __m128 c)
95
{
96
  return _mm_fnmadd_ps (a, b, c);
97
}
98
 
99
__m256
100
check_mm256_fnmadd_ps (__m256 a, __m256 b, __m256 c)
101
{
102
  return _mm256_fnmadd_ps (a, b, c);
103
}
104
 
105
__m128d
106
check_mm_fnmadd_sd (__m128d a, __m128d b, __m128d c)
107
{
108
  return _mm_fnmadd_sd (a, b, c);
109
}
110
 
111
__m128
112
check_mm_fnmadd_ss (__m128 a, __m128 b, __m128 c)
113
{
114
  return _mm_fnmadd_ss (a, b, c);
115
}
116
 
117
__m128d
118
check_mm_fnmsub_pd (__m128d a, __m128d b, __m128d c)
119
{
120
  return _mm_fnmsub_pd (a, b, c);
121
}
122
 
123
__m256d
124
check_mm256_fnmsub_pd (__m256d a, __m256d b, __m256d c)
125
{
126
  return _mm256_fnmsub_pd (a, b, c);
127
}
128
 
129
__m128
130
check_mm_fnmsub_ps (__m128 a, __m128 b, __m128 c)
131
{
132
  return _mm_fnmsub_ps (a, b, c);
133
}
134
 
135
__m256
136
check_mm256_fnmsub_ps (__m256 a, __m256 b, __m256 c)
137
{
138
  return _mm256_fnmsub_ps (a, b, c);
139
}
140
 
141
__m128d
142
check_mm_fnmsub_sd (__m128d a, __m128d b, __m128d c)
143
{
144
  return _mm_fnmsub_sd (a, b, c);
145
}
146
 
147
__m128
148
check_mm_fnmsub_ss (__m128 a, __m128 b, __m128 c)
149
{
150
  return _mm_fnmsub_ss (a, b, c);
151
}
152
 
153
__m128d
154
check_mm_fmaddsub_pd (__m128d a, __m128d b, __m128d c)
155
{
156
  return _mm_fmaddsub_pd (a, b, c);
157
}
158
 
159
__m256d
160
check_mm256_fmaddsub_pd (__m256d a, __m256d b, __m256d c)
161
{
162
  return _mm256_fmaddsub_pd (a, b, c);
163
}
164
 
165
__m128
166
check_mm_fmaddsub_ps (__m128 a, __m128 b, __m128 c)
167
{
168
  return _mm_fmaddsub_ps (a, b, c);
169
}
170
 
171
__m256
172
check_mm256_fmaddsub_ps (__m256 a, __m256 b, __m256 c)
173
{
174
  return _mm256_fmaddsub_ps (a, b, c);
175
}
176
 
177
__m128d
178
check_mm_fmsubadd_pd (__m128d a, __m128d b, __m128d c)
179
{
180
  return _mm_fmsubadd_pd (a, b, c);
181
}
182
 
183
__m256d
184
check_mm256_fmsubadd_pd (__m256d a, __m256d b, __m256d c)
185
{
186
  return _mm256_fmsubadd_pd (a, b, c);
187
}
188
 
189
__m128
190
check_mm_fmsubadd_ps (__m128 a, __m128 b, __m128 c)
191
{
192
  return _mm_fmsubadd_ps (a, b, c);
193
}
194
 
195
__m256
196
check_mm256_fmsubadd_ps (__m256 a, __m256 b, __m256 c)
197
{
198
  return _mm256_fmsubadd_ps (a, b, c);
199
}
200
 
201
 
202
/* { dg-final { scan-assembler-times "vfmadd\[^s\]..ps" 2 } } */
203
/* { dg-final { scan-assembler-times "vfmsub\[^s\]..ps" 2 } } */
204
/* { dg-final { scan-assembler-times "vfnmadd...ps" 2 } } */
205
/* { dg-final { scan-assembler-times "vfnmsub...ps" 2 } } */
206
/* { dg-final { scan-assembler-times "vfmaddsub...ps" 2 } } */
207
/* { dg-final { scan-assembler-times "vfmsubadd...ps" 2 } } */
208
/* { dg-final { scan-assembler-times "vfmadd\[^s\]..pd" 2 } } */
209
/* { dg-final { scan-assembler-times "vfmsub\[^s\]..pd" 2 } } */
210
/* { dg-final { scan-assembler-times "vfnmadd...pd" 2 } } */
211
/* { dg-final { scan-assembler-times "vfnmsub...pd" 2 } } */
212
/* { dg-final { scan-assembler-times "vfmaddsub...pd" 2 } } */
213
/* { dg-final { scan-assembler-times "vfmsubadd...pd" 2 } } */
214
/* { dg-final { scan-assembler-times "vfmadd\[^s\]..ss" 1 } } */
215
/* { dg-final { scan-assembler-times "vfmsub\[^s\]..ss" 1 } } */
216
/* { dg-final { scan-assembler-times "vfnmadd...ss" 1 } } */
217
/* { dg-final { scan-assembler-times "vfnmsub...ss" 1 } } */
218
/* { dg-final { scan-assembler-times "vfmadd\[^s\]..sd" 1 } } */
219
/* { dg-final { scan-assembler-times "vfmsub\[^s\]..sd" 1 } } */
220
/* { dg-final { scan-assembler-times "vfnmadd...sd" 1 } } */
221
/* { dg-final { scan-assembler-times "vfnmsub...sd" 1 } } */

powered by: WebSVN 2.1.0

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