stdarch-test: [us]shll[tb] have no aliases

SVE's `[us]shll[tb]` intructions have no aliases unlike Neon's
`[us]hll{2}` so this logic needs adjusted to not accidentally rewrite
the instruction.
This commit is contained in:
David Wood
2026-04-14 00:03:19 +00:00
parent acb48ca2ca
commit e6c0129553
@@ -158,16 +158,26 @@ fn parse(output: &str) -> HashSet<Function> {
};
if cfg!(any(target_arch = "aarch64", target_arch = "arm64ec")) {
// Normalize [us]shll.* ..., #0 instructions to the preferred form: [us]xtl.* ...
// as neither LLVM objdump nor dumpbin does that.
// See https://developer.arm.com/documentation/ddi0602/latest/SIMD-FP-Instructions/UXTL--UXTL2--Unsigned-extend-Long--an-alias-of-USHLL--USHLL2-
// and https://developer.arm.com/documentation/ddi0602/latest/SIMD-FP-Instructions/SXTL--SXTL2--Signed-extend-Long--an-alias-of-SSHLL--SSHLL2-
// for details.
// Normalize `[us]shll{2}.* ..., #0` instructions to the preferred
// form: `[us]xtl{2}.* ...` as neither LLVM objdump nor dumpbin does that.
//
// SVE has `[us]shll[tb]` instructions that don't have an equivalent alias.
//
// See Arm documentation for details:
//
// - https://developer.arm.com/documentation/ddi0602/2026-03/SIMD-FP-Instructions/UXTL--UXTL2--Unsigned-extend-long--an-alias-of-USHLL--USHLL2-?lang=en
// - https://developer.arm.com/documentation/ddi0602/2026-03/SIMD-FP-Instructions/SXTL--SXTL2--Signed-extend-long--an-alias-of-SSHLL--SSHLL2-?lang=en
fn is_shll(instr: &str) -> bool {
if cfg!(target_env = "msvc") {
instr.starts_with("ushll") || instr.starts_with("sshll")
instr == "ushll"
|| instr == "ushll2"
|| instr == "sshll"
|| instr == "sshll2"
} else {
instr.starts_with("ushll.") || instr.starts_with("sshll.")
instr == "ushll."
|| instr == "ushll2."
|| instr == "sshll."
|| instr == "sshll2."
}
}
match (parts.first(), parts.last()) {