aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr57756_2.c
blob: 0227d8ff402da273071d7f4479e4f11982daa591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* { dg-do run } */
/* { dg-options "-mno-sse2 -mno-popcnt -mno-avx" } */


__attribute__((always_inline,target("avx2")))
__inline int c1 ()
{
  return 0;
}

__attribute__((always_inline,target("avx")))
__inline int c2 ()
{
  return 0;
}

__attribute__((always_inline,target("popcnt")))
__inline int c3 ()
{
  return 0;
}

__attribute__((always_inline,target("sse4.2")))
__inline int c4 ()
{
  return 0;
}

__attribute__((always_inline,target("sse4.1")))
__inline int c5 ()
{
  return 0;
}

__attribute__((always_inline,target("ssse3")))
__inline int c6 ()
{
  return 0;
}

__attribute__((always_inline,target("sse3")))
__inline int c7 ()
{
  return 0;
}

__attribute__((always_inline,target("sse2")))
__inline int c8 ()
{
  return 0;
}

int nop ()
{
  return 1;
}

#pragma GCC push_options
#pragma GCC target("sse2")
int C8 ()
{
  return c8 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("sse3")
int C7 ()
{
  return c7 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("ssse3")
int C6 ()
{
  return c6 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("sse4.1")
int C5 ()
{
  return c5 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("sse4.2")
int C4 ()
{
  return c4 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("popcnt")
int C3 ()
{
  return c3 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("avx")
int C2 ()
{
  return c2 ();
}
#pragma GCC pop_options


#pragma GCC push_options
#pragma GCC target("avx2")
int C1 ()
{
  return c1 ();
}
#pragma GCC pop_options

int main ()
{
  return C1 () + C2 () + C3 () + C4 () + C5 () + C6 () + C7 () + C8 ();
}