99
1010#[ repr( simd) ]
1111#[ derive( Copy , Clone , PartialEq , Debug ) ]
12- struct f32x4 ( pub f32 , pub f32 , pub f32 , pub f32 ) ;
12+ struct f32x4 ( pub [ f32 ; 4 ] ) ;
1313
1414use std:: intrinsics:: simd:: * ;
1515
1616fn main ( ) {
17- let x = f32x4 ( 1.0 , 2.0 , 3.0 , 4.0 ) ;
18- let y = f32x4 ( 2.0 , 1.0 , 4.0 , 3.0 ) ;
17+ let x = f32x4 ( [ 1.0 , 2.0 , 3.0 , 4.0 ] ) ;
18+ let y = f32x4 ( [ 2.0 , 1.0 , 4.0 , 3.0 ] ) ;
1919
2020 #[ cfg( not( any( target_arch = "mips" , target_arch = "mips64" ) ) ) ]
2121 let nan = f32:: NAN ;
@@ -24,13 +24,13 @@ fn main() {
2424 #[ cfg( any( target_arch = "mips" , target_arch = "mips64" ) ) ]
2525 let nan = f32:: from_bits ( f32:: NAN . to_bits ( ) - 1 ) ;
2626
27- let n = f32x4 ( nan, nan, nan, nan) ;
27+ let n = f32x4 ( [ nan, nan, nan, nan] ) ;
2828
2929 unsafe {
3030 let min0 = simd_fmin ( x, y) ;
3131 let min1 = simd_fmin ( y, x) ;
3232 assert_eq ! ( min0, min1) ;
33- let e = f32x4 ( 1.0 , 1.0 , 3.0 , 3.0 ) ;
33+ let e = f32x4 ( [ 1.0 , 1.0 , 3.0 , 3.0 ] ) ;
3434 assert_eq ! ( min0, e) ;
3535 let minn = simd_fmin ( x, n) ;
3636 assert_eq ! ( minn, x) ;
@@ -40,7 +40,7 @@ fn main() {
4040 let max0 = simd_fmax ( x, y) ;
4141 let max1 = simd_fmax ( y, x) ;
4242 assert_eq ! ( max0, max1) ;
43- let e = f32x4 ( 2.0 , 2.0 , 4.0 , 4.0 ) ;
43+ let e = f32x4 ( [ 2.0 , 2.0 , 4.0 , 4.0 ] ) ;
4444 assert_eq ! ( max0, e) ;
4545 let maxn = simd_fmax ( x, n) ;
4646 assert_eq ! ( maxn, x) ;
0 commit comments