@@ -335,9 +335,8 @@ mod sealed {
335
335
336
336
impl_vec_trait ! { [ VectorMax vec_max] ~( vmxlb, vmxb, vmxlh, vmxh, vmxlf, vmxf, vmxlg, vmxg) }
337
337
338
- // FIXME(vector-enhancements-1) test for the `vfmaxsb` etc. instruction
339
- test_impl ! { vec_vfmaxsb ( a: vector_float, b: vector_float) -> vector_float [ simd_fmax, _] }
340
- test_impl ! { vec_vfmaxdb ( a: vector_double, b: vector_double) -> vector_double [ simd_fmax, _] }
338
+ test_impl ! { vec_vfmaxsb ( a: vector_float, b: vector_float) -> vector_float [ simd_fmax, "vector-enhancements-1" vfmaxsb ] }
339
+ test_impl ! { vec_vfmaxdb ( a: vector_double, b: vector_double) -> vector_double [ simd_fmax, "vector-enhancements-1" vfmaxdb] }
341
340
342
341
impl_vec_trait ! ( [ VectorMax vec_max] vec_vfmaxsb ( vector_float, vector_float) -> vector_float) ;
343
342
impl_vec_trait ! ( [ VectorMax vec_max] vec_vfmaxdb ( vector_double, vector_double) -> vector_double) ;
@@ -360,9 +359,8 @@ mod sealed {
360
359
361
360
impl_vec_trait ! { [ VectorMin vec_min] ~( vmxlb, vmxb, vmxlh, vmxh, vmxlf, vmxf, vmxlg, vmxg) }
362
361
363
- // FIXME(vector-enhancements-1) test for the `vfminsb` etc. instruction
364
- test_impl ! { vec_vfminsb ( a: vector_float, b: vector_float) -> vector_float [ simd_fmin, _] }
365
- test_impl ! { vec_vfmindb ( a: vector_double, b: vector_double) -> vector_double [ simd_fmin, _] }
362
+ test_impl ! { vec_vfminsb ( a: vector_float, b: vector_float) -> vector_float [ simd_fmin, "vector-enhancements-1" vfminsb] }
363
+ test_impl ! { vec_vfmindb ( a: vector_double, b: vector_double) -> vector_double [ simd_fmin, "vector-enhancements-1" vfmindb] }
366
364
367
365
impl_vec_trait ! ( [ VectorMin vec_min] vec_vfminsb ( vector_float, vector_float) -> vector_float) ;
368
366
impl_vec_trait ! ( [ VectorMin vec_min] vec_vfmindb ( vector_double, vector_double) -> vector_double) ;
@@ -389,8 +387,7 @@ mod sealed {
389
387
impl_abs ! { vec_abs_i32, i32x4 }
390
388
impl_abs ! { vec_abs_i64, i64x2 }
391
389
392
- // FIXME(vector-enhancements-1)
393
- test_impl ! { vec_abs_f32 ( v: vector_float) -> vector_float [ simd_fabs, _ ] }
390
+ test_impl ! { vec_abs_f32 ( v: vector_float) -> vector_float [ simd_fabs, "vector-enhancements-1" vflpsb ] }
394
391
test_impl ! { vec_abs_f64 ( v: vector_double) -> vector_double [ simd_fabs, vflpdb ] }
395
392
396
393
impl_vec_trait ! { [ VectorAbs vec_abs] vec_abs_f32 ( vector_float) }
@@ -527,10 +524,15 @@ mod sealed {
527
524
test_impl ! { vec_ctzf_unsigned +( a: vector_unsigned_int) -> vector_unsigned_int [ simd_cttz, vctzf] }
528
525
test_impl ! { vec_ctzg_unsigned +( a: vector_unsigned_long_long) -> vector_unsigned_long_long [ simd_cttz, vctzg] }
529
526
530
- // FIXME(vector-enhancements-1) other integer types are emulated, but get their own
531
- // instructions in later facilities. Add tests when possible.
532
- test_impl ! { vec_popcnt_signed +( a: vector_signed_char) -> vector_signed_char [ simd_ctpop, vpopctb] }
533
- test_impl ! { vec_popcnt_unsigned +( a: vector_unsigned_char) -> vector_unsigned_char [ simd_ctpop, vpopctb] }
527
+ test_impl ! { vec_vpopctb_signed +( a: vector_signed_char) -> vector_signed_char [ simd_ctpop, vpopctb] }
528
+ test_impl ! { vec_vpopcth_signed +( a: vector_signed_short) -> vector_signed_short [ simd_ctpop, "vector-enhancements-1" vpopcth] }
529
+ test_impl ! { vec_vpopctf_signed +( a: vector_signed_int) -> vector_signed_int [ simd_ctpop, "vector-enhancements-1" vpopctf] }
530
+ test_impl ! { vec_vpopctg_signed +( a: vector_signed_long_long) -> vector_signed_long_long [ simd_ctpop, "vector-enhancements-1" vpopctg] }
531
+
532
+ test_impl ! { vec_vpopctb_unsigned +( a: vector_unsigned_char) -> vector_unsigned_char [ simd_ctpop, vpopctb] }
533
+ test_impl ! { vec_vpopcth_unsigned +( a: vector_unsigned_short) -> vector_unsigned_short [ simd_ctpop, "vector-enhancements-1" vpopcth] }
534
+ test_impl ! { vec_vpopctf_unsigned +( a: vector_unsigned_int) -> vector_unsigned_int [ simd_ctpop, "vector-enhancements-1" vpopctf] }
535
+ test_impl ! { vec_vpopctg_unsigned +( a: vector_unsigned_long_long) -> vector_unsigned_long_long [ simd_ctpop, "vector-enhancements-1" vpopctg] }
534
536
535
537
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
536
538
pub trait VectorAnd < Other > {
@@ -558,7 +560,7 @@ mod sealed {
558
560
559
561
#[ inline]
560
562
#[ target_feature( enable = "vector" ) ]
561
- // FIXME( vector-enhancements-1) #[cfg_attr(test , assert_instr(vno))]
563
+ # [ cfg_attr ( all ( test , target_feature = " vector-enhancements-1" ) , assert_instr( vno) ) ]
562
564
unsafe fn nor ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
563
565
let a: u8x16 = transmute ( a) ;
564
566
let b: u8x16 = transmute ( b) ;
@@ -575,7 +577,7 @@ mod sealed {
575
577
576
578
#[ inline]
577
579
#[ target_feature( enable = "vector" ) ]
578
- // FIXME( vector-enhancements-1) #[cfg_attr(test , assert_instr(vnn))]
580
+ # [ cfg_attr ( all ( test , target_feature = " vector-enhancements-1" ) , assert_instr( vnn) ) ]
579
581
unsafe fn nand ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
580
582
let a: u8x16 = transmute ( a) ;
581
583
let b: u8x16 = transmute ( b) ;
@@ -592,7 +594,7 @@ mod sealed {
592
594
593
595
#[ inline]
594
596
#[ target_feature( enable = "vector" ) ]
595
- // FIXME( vector-enhancements-1) #[cfg_attr(test , assert_instr(vnx))]
597
+ # [ cfg_attr ( all ( test , target_feature = " vector-enhancements-1" ) , assert_instr( vnx) ) ]
596
598
unsafe fn eqv ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
597
599
let a: u8x16 = transmute ( a) ;
598
600
let b: u8x16 = transmute ( b) ;
@@ -609,7 +611,7 @@ mod sealed {
609
611
610
612
#[ inline]
611
613
#[ target_feature( enable = "vector" ) ]
612
- // FIXME( vector-enhancements-1) #[cfg_attr(test , assert_instr(vnc))]
614
+ # [ cfg_attr ( all ( test , target_feature = " vector-enhancements-1" ) , assert_instr( vnc) ) ]
613
615
unsafe fn andc ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
614
616
let a = transmute ( a) ;
615
617
let b = transmute ( b) ;
@@ -626,7 +628,7 @@ mod sealed {
626
628
627
629
#[ inline]
628
630
#[ target_feature( enable = "vector" ) ]
629
- // FIXME( vector-enhancements-1) #[cfg_attr(test , assert_instr(voc))]
631
+ # [ cfg_attr ( all ( test , target_feature = " vector-enhancements-1" ) , assert_instr( voc) ) ]
630
632
unsafe fn orc ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
631
633
let a = transmute ( a) ;
632
634
let b = transmute ( b) ;
@@ -641,15 +643,14 @@ mod sealed {
641
643
642
644
impl_vec_trait ! { [ VectorOrc vec_orc] + 2 c ( orc) }
643
645
644
- // FIXME(vector-enhancements-1) add instr tests for f32
645
- test_impl ! { vec_roundc_f32 ( a: vector_float) -> vector_float [ nearbyint_v4f32, _] }
646
+ test_impl ! { vec_roundc_f32 ( a: vector_float) -> vector_float [ nearbyint_v4f32, "vector-enhancements-1" vfisb] }
646
647
test_impl ! { vec_roundc_f64 ( a: vector_double) -> vector_double [ nearbyint_v2f64, vfidb] }
647
648
648
649
// FIXME(llvm) roundeven does not yet lower to vfidb (but should in the future)
649
650
test_impl ! { vec_round_f32 ( a: vector_float) -> vector_float [ roundeven_v4f32, _] }
650
651
test_impl ! { vec_round_f64 ( a: vector_double) -> vector_double [ roundeven_v2f64, _] }
651
652
652
- test_impl ! { vec_rint_f32 ( a: vector_float) -> vector_float [ rint_v4f32, _ ] }
653
+ test_impl ! { vec_rint_f32 ( a: vector_float) -> vector_float [ rint_v4f32, "vector-enhancements-1" vfisb ] }
653
654
test_impl ! { vec_rint_f64 ( a: vector_double) -> vector_double [ rint_v2f64, vfidb] }
654
655
655
656
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
0 commit comments