Skip to content

Commit 5c6dc52

Browse files
committed
Update intrinsic tests for LLVM 16
1 parent c262de9 commit 5c6dc52

File tree

2 files changed

+53
-29
lines changed

2 files changed

+53
-29
lines changed

crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ pub unsafe fn vcgeq_f64(a: float64x2_t, b: float64x2_t) -> uint64x2_t {
13491349
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgez_s8)
13501350
#[inline]
13511351
#[target_feature(enable = "neon")]
1352-
#[cfg_attr(test, assert_instr(cmge))]
1352+
#[cfg_attr(test, assert_instr(cmgt))]
13531353
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
13541354
pub unsafe fn vcgez_s8(a: int8x8_t) -> uint8x8_t {
13551355
let b: i8x8 = i8x8::new(0, 0, 0, 0, 0, 0, 0, 0);
@@ -1361,7 +1361,7 @@ pub unsafe fn vcgez_s8(a: int8x8_t) -> uint8x8_t {
13611361
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgezq_s8)
13621362
#[inline]
13631363
#[target_feature(enable = "neon")]
1364-
#[cfg_attr(test, assert_instr(cmge))]
1364+
#[cfg_attr(test, assert_instr(cmgt))]
13651365
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
13661366
pub unsafe fn vcgezq_s8(a: int8x16_t) -> uint8x16_t {
13671367
let b: i8x16 = i8x16::new(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -1373,7 +1373,7 @@ pub unsafe fn vcgezq_s8(a: int8x16_t) -> uint8x16_t {
13731373
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgez_s16)
13741374
#[inline]
13751375
#[target_feature(enable = "neon")]
1376-
#[cfg_attr(test, assert_instr(cmge))]
1376+
#[cfg_attr(test, assert_instr(cmgt))]
13771377
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
13781378
pub unsafe fn vcgez_s16(a: int16x4_t) -> uint16x4_t {
13791379
let b: i16x4 = i16x4::new(0, 0, 0, 0);
@@ -1385,7 +1385,7 @@ pub unsafe fn vcgez_s16(a: int16x4_t) -> uint16x4_t {
13851385
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgezq_s16)
13861386
#[inline]
13871387
#[target_feature(enable = "neon")]
1388-
#[cfg_attr(test, assert_instr(cmge))]
1388+
#[cfg_attr(test, assert_instr(cmgt))]
13891389
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
13901390
pub unsafe fn vcgezq_s16(a: int16x8_t) -> uint16x8_t {
13911391
let b: i16x8 = i16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
@@ -1397,7 +1397,7 @@ pub unsafe fn vcgezq_s16(a: int16x8_t) -> uint16x8_t {
13971397
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgez_s32)
13981398
#[inline]
13991399
#[target_feature(enable = "neon")]
1400-
#[cfg_attr(test, assert_instr(cmge))]
1400+
#[cfg_attr(test, assert_instr(cmgt))]
14011401
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
14021402
pub unsafe fn vcgez_s32(a: int32x2_t) -> uint32x2_t {
14031403
let b: i32x2 = i32x2::new(0, 0);
@@ -1409,7 +1409,7 @@ pub unsafe fn vcgez_s32(a: int32x2_t) -> uint32x2_t {
14091409
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgezq_s32)
14101410
#[inline]
14111411
#[target_feature(enable = "neon")]
1412-
#[cfg_attr(test, assert_instr(cmge))]
1412+
#[cfg_attr(test, assert_instr(cmgt))]
14131413
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
14141414
pub unsafe fn vcgezq_s32(a: int32x4_t) -> uint32x4_t {
14151415
let b: i32x4 = i32x4::new(0, 0, 0, 0);
@@ -1421,7 +1421,7 @@ pub unsafe fn vcgezq_s32(a: int32x4_t) -> uint32x4_t {
14211421
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgez_s64)
14221422
#[inline]
14231423
#[target_feature(enable = "neon")]
1424-
#[cfg_attr(test, assert_instr(cmge))]
1424+
#[cfg_attr(test, assert_instr(cmgt))]
14251425
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
14261426
pub unsafe fn vcgez_s64(a: int64x1_t) -> uint64x1_t {
14271427
let b: i64x1 = i64x1::new(0);
@@ -1433,7 +1433,7 @@ pub unsafe fn vcgez_s64(a: int64x1_t) -> uint64x1_t {
14331433
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgezq_s64)
14341434
#[inline]
14351435
#[target_feature(enable = "neon")]
1436-
#[cfg_attr(test, assert_instr(cmge))]
1436+
#[cfg_attr(test, assert_instr(cmgt))]
14371437
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
14381438
pub unsafe fn vcgezq_s64(a: int64x2_t) -> uint64x2_t {
14391439
let b: i64x2 = i64x2::new(0, 0);
@@ -1493,7 +1493,7 @@ pub unsafe fn vcgezq_f64(a: float64x2_t) -> uint64x2_t {
14931493
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcgezd_s64)
14941494
#[inline]
14951495
#[target_feature(enable = "neon")]
1496-
#[cfg_attr(test, assert_instr(eor))]
1496+
#[cfg_attr(test, assert_instr(nop))]
14971497
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
14981498
pub unsafe fn vcgezd_s64(a: i64) -> u64 {
14991499
transmute(vcgez_s64(transmute(a)))
@@ -11595,7 +11595,7 @@ pub unsafe fn vqdmlal_high_laneq_s32<const N: i32>(a: int64x2_t, b: int32x4_t, c
1159511595
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlalh_s16)
1159611596
#[inline]
1159711597
#[target_feature(enable = "neon")]
11598-
#[cfg_attr(test, assert_instr(sqdmull))]
11598+
#[cfg_attr(test, assert_instr(sqdmlal))]
1159911599
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1160011600
pub unsafe fn vqdmlalh_s16(a: i32, b: i16, c: i16) -> i32 {
1160111601
let x: int32x4_t = vqdmull_s16(vdup_n_s16(b), vdup_n_s16(c));
@@ -11607,11 +11607,11 @@ pub unsafe fn vqdmlalh_s16(a: i32, b: i16, c: i16) -> i32 {
1160711607
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlals_s32)
1160811608
#[inline]
1160911609
#[target_feature(enable = "neon")]
11610-
#[cfg_attr(test, assert_instr(sqdmull))]
11610+
#[cfg_attr(test, assert_instr(sqdmlal))]
1161111611
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1161211612
pub unsafe fn vqdmlals_s32(a: i64, b: i32, c: i32) -> i64 {
11613-
let x: int64x2_t = vqdmull_s32(vdup_n_s32(b), vdup_n_s32(c));
11614-
vqaddd_s64(a, simd_extract(x, 0))
11613+
let x: i64 = vqaddd_s64(a, vqdmulls_s32(b, c));
11614+
x as i64
1161511615
}
1161611616

1161711617
/// Signed saturating doubling multiply-add long
@@ -11645,7 +11645,7 @@ pub unsafe fn vqdmlalh_laneq_s16<const LANE: i32>(a: i32, b: i16, c: int16x8_t)
1164511645
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlals_lane_s32)
1164611646
#[inline]
1164711647
#[target_feature(enable = "neon")]
11648-
#[cfg_attr(test, assert_instr(sqdmull, LANE = 0))]
11648+
#[cfg_attr(test, assert_instr(sqdmlal, LANE = 0))]
1164911649
#[rustc_legacy_const_generics(3)]
1165011650
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1165111651
pub unsafe fn vqdmlals_lane_s32<const LANE: i32>(a: i64, b: i32, c: int32x2_t) -> i64 {
@@ -11658,7 +11658,7 @@ pub unsafe fn vqdmlals_lane_s32<const LANE: i32>(a: i64, b: i32, c: int32x2_t) -
1165811658
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlals_laneq_s32)
1165911659
#[inline]
1166011660
#[target_feature(enable = "neon")]
11661-
#[cfg_attr(test, assert_instr(sqdmull, LANE = 0))]
11661+
#[cfg_attr(test, assert_instr(sqdmlal, LANE = 0))]
1166211662
#[rustc_legacy_const_generics(3)]
1166311663
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1166411664
pub unsafe fn vqdmlals_laneq_s32<const LANE: i32>(a: i64, b: i32, c: int32x4_t) -> i64 {
@@ -11793,7 +11793,7 @@ pub unsafe fn vqdmlsl_high_laneq_s32<const N: i32>(a: int64x2_t, b: int32x4_t, c
1179311793
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlslh_s16)
1179411794
#[inline]
1179511795
#[target_feature(enable = "neon")]
11796-
#[cfg_attr(test, assert_instr(sqdmull))]
11796+
#[cfg_attr(test, assert_instr(sqdmlsl))]
1179711797
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1179811798
pub unsafe fn vqdmlslh_s16(a: i32, b: i16, c: i16) -> i32 {
1179911799
let x: int32x4_t = vqdmull_s16(vdup_n_s16(b), vdup_n_s16(c));
@@ -11805,11 +11805,11 @@ pub unsafe fn vqdmlslh_s16(a: i32, b: i16, c: i16) -> i32 {
1180511805
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlsls_s32)
1180611806
#[inline]
1180711807
#[target_feature(enable = "neon")]
11808-
#[cfg_attr(test, assert_instr(sqdmull))]
11808+
#[cfg_attr(test, assert_instr(sqdmlsl))]
1180911809
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1181011810
pub unsafe fn vqdmlsls_s32(a: i64, b: i32, c: i32) -> i64 {
11811-
let x: int64x2_t = vqdmull_s32(vdup_n_s32(b), vdup_n_s32(c));
11812-
vqsubd_s64(a, simd_extract(x, 0))
11811+
let x: i64 = vqsubd_s64(a, vqdmulls_s32(b, c));
11812+
x as i64
1181311813
}
1181411814

1181511815
/// Signed saturating doubling multiply-subtract long
@@ -11843,7 +11843,7 @@ pub unsafe fn vqdmlslh_laneq_s16<const LANE: i32>(a: i32, b: i16, c: int16x8_t)
1184311843
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlsls_lane_s32)
1184411844
#[inline]
1184511845
#[target_feature(enable = "neon")]
11846-
#[cfg_attr(test, assert_instr(sqdmull, LANE = 0))]
11846+
#[cfg_attr(test, assert_instr(sqdmlsl, LANE = 0))]
1184711847
#[rustc_legacy_const_generics(3)]
1184811848
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1184911849
pub unsafe fn vqdmlsls_lane_s32<const LANE: i32>(a: i64, b: i32, c: int32x2_t) -> i64 {
@@ -11856,7 +11856,7 @@ pub unsafe fn vqdmlsls_lane_s32<const LANE: i32>(a: i64, b: i32, c: int32x2_t) -
1185611856
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlsls_laneq_s32)
1185711857
#[inline]
1185811858
#[target_feature(enable = "neon")]
11859-
#[cfg_attr(test, assert_instr(sqdmull, LANE = 0))]
11859+
#[cfg_attr(test, assert_instr(sqdmlsl, LANE = 0))]
1186011860
#[rustc_legacy_const_generics(3)]
1186111861
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1186211862
pub unsafe fn vqdmlsls_laneq_s32<const LANE: i32>(a: i64, b: i32, c: int32x4_t) -> i64 {

crates/stdarch-gen/neon.spec

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ a = MIN, -1, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0
732732
fixed = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
733733
validate FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE
734734

735-
aarch64 = cmge
735+
aarch64 = cmgt
736736
generate int8x8_t:uint8x8_t, int8x16_t:uint8x16_t, int16x4_t:uint16x4_t, int16x8_t:uint16x8_t, int32x2_t:uint32x2_t, int32x4_t:uint32x4_t, int64x1_t:uint64x1_t, int64x2_t:uint64x2_t
737737

738738
/// Floating-point compare greater than or equal to zero
@@ -751,7 +751,7 @@ multi_fn = transmute, {vcgez-in_ntt-noext, {transmute, a}}
751751
a = -1
752752
validate 0
753753

754-
aarch64 = eor
754+
aarch64 = nop
755755
generate i64:u64
756756

757757
/// Floating-point compare greater than or equal to zero
@@ -5138,8 +5138,20 @@ b = 1
51385138
c = 2
51395139
validate 5
51405140

5141-
aarch64 = sqdmull
5142-
generate i32:i16:i16:i32, i64:i32:i32:i64
5141+
aarch64 = sqdmlal
5142+
generate i32:i16:i16:i32
5143+
5144+
/// Signed saturating doubling multiply-add long
5145+
name = vqdmlal
5146+
multi_fn = vqadd-out-noext, x:out_t, a, {vqdmulls-in_ntt-noext, b, c}
5147+
multi_fn = x as out_t
5148+
a = 1
5149+
b = 1
5150+
c = 2
5151+
validate 5
5152+
5153+
aarch64 = sqdmlal
5154+
generate i64:i32:i32:i64
51435155

51445156
/// Signed saturating doubling multiply-add long
51455157
name = vqdmlalh_lane
@@ -5156,7 +5168,7 @@ validate 5
51565168
aarch64 = sqdmlal
51575169
generate i32:i16:int16x4_t:i32, i32:i16:int16x8_t:i32
51585170
name = vqdmlals_lane
5159-
aarch64 = sqdmull
5171+
aarch64 = sqdmlal
51605172
generate i64:i32:int32x2_t:i64, i64:i32:int32x4_t:i64
51615173

51625174
/// Signed saturating doubling multiply-subtract long
@@ -5250,8 +5262,20 @@ b = 1
52505262
c = 2
52515263
validate 6
52525264

5253-
aarch64 = sqdmull
5254-
generate i32:i16:i16:i32, i64:i32:i32:i64
5265+
aarch64 = sqdmlsl
5266+
generate i32:i16:i16:i32
5267+
5268+
/// Signed saturating doubling multiply-subtract long
5269+
name = vqdmlsl
5270+
multi_fn = vqsub-out-noext, x:out_t, a, {vqdmulls-in_ntt-noext, b, c}
5271+
multi_fn = x as out_t
5272+
a = 10
5273+
b = 1
5274+
c = 2
5275+
validate 6
5276+
5277+
aarch64 = sqdmlsl
5278+
generate i64:i32:i32:i64
52555279

52565280
/// Signed saturating doubling multiply-subtract long
52575281
name = vqdmlslh_lane
@@ -5268,7 +5292,7 @@ validate 6
52685292
aarch64 = sqdmlsl
52695293
generate i32:i16:int16x4_t:i32, i32:i16:int16x8_t:i32
52705294
name = vqdmlsls_lane
5271-
aarch64 = sqdmull
5295+
aarch64 = sqdmlsl
52725296
generate i64:i32:int32x2_t:i64, i64:i32:int32x4_t:i64
52735297

52745298
/// Signed saturating doubling multiply returning high half

0 commit comments

Comments
 (0)