1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
9 LorentzVector(Value x
=0, Value y
=0, Value z
=0, Value t
=0) :
10 theX(x
),theY(y
),theZ(z
),theT(t
){}
11 LorentzVector
& operator+=(const LorentzVector
& a
) {
23 } __attribute__ ((aligned(16)));
26 operator+(LorentzVector
const & a
, LorentzVector
const & b
) {
28 LorentzVector(a
.theX
+b
.theX
,a
.theY
+b
.theY
,a
.theZ
+b
.theZ
,a
.theT
+b
.theT
);
32 operator*(LorentzVector
const & a
, Value s
) {
33 return LorentzVector(a
.theX
*s
,a
.theY
*s
,a
.theZ
*s
,a
.theT
*s
);
37 operator*(Value s
, LorentzVector
const & a
) {
42 void sum1(LorentzVector
& res
, Value s
, LorentzVector
const & v1
, LorentzVector
47 void sum2(LorentzVector
& res
, Value s
, LorentzVector
const & v1
, LorentzVector
49 res
= res
+ s
*(v1
+v2
);
52 /* { dg-final { scan-tree-dump-times "Vectorized basic-block" 2 "slp" } } */
53 /* { dg-final { cleanup-tree-dump "slp" } } */