From 6cd9503c41e5c6c028d2431d1c24539ba69e0e87 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Thu, 13 Nov 2025 14:35:35 +0000 Subject: [PATCH] arm64: Fix Sve2_ShiftArithmeticRoundedSaturate_sbyte test helper - Fixes #121189 --- src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs index 42e00ccf272bca..cf7b7284b493af 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs @@ -7927,25 +7927,25 @@ public static T XorRotateRight(T op1, T op2, int shift) where T : IBinaryInte public static sbyte SveShiftArithmeticRounded(sbyte op1, sbyte op2) => SignedShift(op1, op2, rounding: true, shiftSat: true); - public static sbyte SveShiftArithmeticSaturate(sbyte op1, sbyte op2) => SignedShift(op1, op2, saturating: true, shiftSat: true); + public static sbyte SveShiftArithmeticSaturate(sbyte op1, sbyte op2) => ArithmeticShift(op1, (int)ShiftSat(-op2, 8), saturate: true); public static sbyte SveShiftArithmeticRoundedSaturate(sbyte op1, sbyte op2) => SignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); public static short SveShiftArithmeticRounded(short op1, short op2) => SignedShift(op1, op2, rounding: true, shiftSat: true); - public static short SveShiftArithmeticSaturate(short op1, short op2) => SignedShift(op1, op2, saturating: true, shiftSat: true); + public static short SveShiftArithmeticSaturate(short op1, short op2) => ArithmeticShift(op1, (int)ShiftSat(-op2, 16), saturate: true); public static short SveShiftArithmeticRoundedSaturate(short op1, short op2) => SignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); public static int SveShiftArithmeticRounded(int op1, int op2) => SignedShift(op1, op2, rounding: true, shiftSat: true); - public static int SveShiftArithmeticSaturate(int op1, int op2) => SignedShift(op1, op2, saturating: true, shiftSat: true); + public static int SveShiftArithmeticSaturate(int op1, int op2) => ArithmeticShift(op1, (int)ShiftSat(-op2, 32), saturate: true); public static int SveShiftArithmeticRoundedSaturate(int op1, int op2) => SignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true); public static long SveShiftArithmeticRounded(long op1, long op2) => SignedShift(op1, op2, rounding: true, shiftSat: true); - public static long SveShiftArithmeticSaturate(long op1, long op2) => SignedShift(op1, op2, saturating: true, shiftSat: true); + public static long SveShiftArithmeticSaturate(long op1, long op2) => ArithmeticShift(op1, (int)ShiftSat(-op2, 64), saturate: true); public static long SveShiftArithmeticRoundedSaturate(long op1, long op2) => SignedShift(op1, op2, rounding: true, saturating: true, shiftSat: true);