OLD | NEW |
1 // { dg-do compile { target i*86-*-* x86_64-*-* } } | 1 // { dg-do compile { target i?86-*-* x86_64-*-* } } |
2 // { dg-options "-O3 -msse2" } | 2 // { dg-options "-O3 -msse2" } |
| 3 // { dg-require-effective-target sse2 } |
3 | 4 |
4 // You can make NON-template typedefs with a large alignment. | 5 // You can make NON-template typedefs with a large alignment. |
5 typedef double AlignedDoubleType __attribute__((aligned(16))); | 6 typedef double AlignedDoubleType __attribute__((aligned(16))); |
6 | 7 |
7 template <typename RealType> | 8 template <typename RealType> |
8 RealType f(const RealType* p) | 9 RealType f(const RealType* p) |
9 { | 10 { |
10 // But if you use a template parameter it complains. | 11 // But if you use a template parameter it complains. |
11 typedef RealType AlignedRealType __attribute__((aligned(16))); | 12 typedef RealType AlignedRealType __attribute__((aligned(16))); |
12 | 13 |
13 return p[0]; | 14 return p[0]; |
14 } | 15 } |
15 | 16 |
16 double f2(const double* p) | 17 double f2(const double* p) |
17 { | 18 { |
18 return f<double>(p); | 19 return f<double>(p); |
19 } | 20 } |
OLD | NEW |