]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/powerpc/pr70010.c
In PR70010, a function is marked with target(no-vsx) to disable VSX code
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / powerpc / pr70010.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -finline-functions" } */
3 /* { dg-final { scan-assembler {\mbl vadd_no_vsx\M} } } */
4
5 typedef int vec_t __attribute__((vector_size(16)));
6
7 static vec_t
8 __attribute__((__target__("no-vsx")))
9 vadd_no_vsx (vec_t a, vec_t b)
10 {
11 return a + b;
12 }
13
14 vec_t
15 __attribute__((__target__("vsx")))
16 call_vadd_no_vsx (vec_t x, vec_t y, vec_t z)
17 {
18 return vadd_no_vsx (x, y) - z;
19 }