LEFT | RIGHT |
1 /* Test case to check if Multiversioning chooses the correct | 1 /* Test case to check if Multiversioning chooses the correct |
2 dispatching order when versions are for various ISAs. */ | 2 dispatching order when versions are for various ISAs. */ |
3 /* { dg-do run { target i?86-*-* x86_64-*-* } } */ | 3 /* { dg-do run { target i?86-*-* x86_64-*-* } } */ |
4 /* { dg-require-ifunc "" } */ | 4 /* { dg-require-ifunc "" } */ |
5 /* { dg-options "-O2" } */ | 5 /* { dg-options "-O2 -mno-sse -mno-mmx -mno-popcnt -mno-avx" } */ |
6 | 6 |
7 #include <assert.h> | 7 #include <assert.h> |
8 | 8 |
9 /* Default version. */ | 9 /* Default version. */ |
10 int foo (); | 10 int foo (); |
11 /* The dispatch checks should be in the exact reverse order of the | 11 /* The dispatch checks should be in the exact reverse order of the |
12 declarations below. */ | 12 declarations below. */ |
13 int foo () __attribute__ ((target ("mmx"))); | 13 int foo () __attribute__ ((target ("mmx"))); |
14 int foo () __attribute__ ((target ("sse"))); | 14 int foo () __attribute__ ((target ("sse"))); |
15 int foo () __attribute__ ((target ("sse2"))); | 15 int foo () __attribute__ ((target ("sse2"))); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 foo () | 110 foo () |
111 { | 111 { |
112 return 2; | 112 return 2; |
113 } | 113 } |
114 | 114 |
115 int __attribute__ ((target("avx2"))) | 115 int __attribute__ ((target("avx2"))) |
116 foo () | 116 foo () |
117 { | 117 { |
118 return 1; | 118 return 1; |
119 } | 119 } |
LEFT | RIGHT |