1 /* PR66119 - MOVE_RATIO is not constant in a compiler run, so Scalar
2 Reduction of Aggregates must ask the back-end more than once what
3 the value of MOVE_RATIO now is. */
5 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && c++11 } } } */
6 /* { dg-options "-O3 -mavx -fdump-tree-sra -march=slm -mtune=slm" } */
15 MyAVX (const MyAVX &) = default;
16 MyAVX (__m256d _data) : data(_data) { ; }
18 MyAVX & operator= (const MyAVX &) = default;
20 operator __m256d () const { return data; }
21 MyAVX operator+ (MyAVX s2) { return data+s2.data; }
24 template <typename T> class AVX_trait { ; };
26 template <> class AVX_trait<double> {
28 typedef __m256d TSIMD;
35 typename AVX_trait<T>::TSIMD data;
39 MyTSIMD (const MyTSIMD &) = default;
40 // MyTSIMD (const MyTSIMD & s2) : data(s2.data) { ; }
41 MyTSIMD (typename AVX_trait<T>::TSIMD _data) : data(_data) { ; }
43 operator typename AVX_trait<T>::TSIMD() const { return data; }
44 MyTSIMD operator+ (MyTSIMD s2) { return data+s2.data; }
47 // using MyVec = MyAVX;
48 using MyVec = MyTSIMD<double>;
54 Vec2 (MyVec aa, MyVec ab) : a(aa), b(ab) { ; }
55 Vec2 operator+ (Vec2 v2) { return Vec2(a+v2.a, b+v2.b); }
58 inline __attribute__ ((__always_inline__))
59 Vec2 ComputeSomething (Vec2 a, Vec2 b)
64 Vec2 TestFunction (Vec2 a, Vec2 b)
66 return ComputeSomething (a,b);
69 /* { dg-final { scan-tree-dump "Created a replacement for b" "sra" } } */