Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple tests fail on Macos aarch64 #1206

Open
hkratz opened this issue Sep 7, 2021 · 8 comments
Open

Multiple tests fail on Macos aarch64 #1206

hkratz opened this issue Sep 7, 2021 · 8 comments

Comments

@hkratz
Copy link
Contributor

hkratz commented Sep 7, 2021

failures:

---- core_arch::aarch64::neon::assert_vld1q_lane_f64_ldr stdout ----
disassembly for stdarch_test_shim_vld1q_lane_f64_ldr:
	 0: ld1.d { v0 }[1], [x0]
	 1: ret
thread 'core_arch::aarch64::neon::assert_vld1q_lane_f64_ldr' panicked at 'failed to find instruction `ldr` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::aarch64::neon::assert_vld1q_dup_f64_ldr stdout ----
disassembly for stdarch_test_shim_vld1q_dup_f64_ldr:
	 0: ld1r.2d { v0 }, [x0]
	 1: ret
thread 'core_arch::aarch64::neon::assert_vld1q_dup_f64_ldr' panicked at 'failed to find instruction `ldr` in the disassembly', crates/stdarch-test/src/lib.rs:162:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- core_arch::aarch64::neon::generated::assert_vqrdmlahs_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahs_lane_s32_sqrdmulh:
	 0: dup.2s v1, w1
	 1: fmov s2, w0
	 2: sqrdmlah.2s v2, v1, v0[1]
	 3: fmov w0, s2
	 4: ret
thread 'core_arch::aarch64::neon::generated::assert_vqrdmlahs_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::aarch64::neon::generated::assert_vqrdmlahs_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahs_laneq_s32_sqrdmulh:
	 0: dup.2s v1, w1
	 1: fmov s2, w0
	 2: sqrdmlah.2s v2, v1, v0[1]
	 3: fmov w0, s2
	 4: ret
thread 'core_arch::aarch64::neon::generated::assert_vqrdmlahs_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::aarch64::neon::generated::assert_vqrdmlshs_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshs_lane_s32_sqrdmulh:
	 0: dup.2s v1, w1
	 1: fmov s2, w0
	 2: sqrdmlsh.2s v2, v1, v0[1]
	 3: fmov w0, s2
	 4: ret
thread 'core_arch::aarch64::neon::generated::assert_vqrdmlshs_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::aarch64::neon::generated::assert_vqrdmlshs_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshs_laneq_s32_sqrdmulh:
	 0: dup.2s v1, w1
	 1: fmov s2, w0
	 2: sqrdmlsh.2s v2, v1, v0[1]
	 3: fmov w0, s2
	 4: ret
thread 'core_arch::aarch64::neon::generated::assert_vqrdmlshs_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_lane_s16_sqrdmulh:
	 0: sqrdmlah.4h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_lane_s32_sqrdmulh:
	 0: sqrdmlah.2s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_s16_sqrdmulh:
	 0: sqrdmlah.4h v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_laneq_s32_sqrdmulh:
	 0: sqrdmlah.2s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_s32_sqrdmulh:
	 0: sqrdmlah.2s v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_lane_s16_sqrdmulh:
	 0: sqrdmlah.8h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlah_laneq_s16_sqrdmulh:
	 0: sqrdmlah.4h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_lane_s32_sqrdmulh:
	 0: sqrdmlah.4s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_laneq_s32_sqrdmulh:
	 0: sqrdmlah.4s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_laneq_s16_sqrdmulh:
	 0: sqrdmlah.8h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_s16_sqrdmulh:
	 0: sqrdmlah.8h v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlahq_s32_sqrdmulh:
	 0: sqrdmlah.4s v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_lane_s16_sqrdmulh:
	 0: sqrdmlsh.4h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_lane_s32_sqrdmulh:
	 0: sqrdmlsh.2s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_laneq_s16_sqrdmulh:
	 0: sqrdmlsh.4h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_laneq_s32_sqrdmulh:
	 0: sqrdmlsh.2s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_s16_sqrdmulh:
	 0: sqrdmlsh.4h v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlsh_s32_sqrdmulh:
	 0: sqrdmlsh.2s v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_lane_s16_sqrdmulh:
	 0: sqrdmlsh.8h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_lane_s32_sqrdmulh:
	 0: sqrdmlsh.4s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_laneq_s16_sqrdmulh:
	 0: sqrdmlsh.8h v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_laneq_s32_sqrdmulh:
	 0: sqrdmlsh.4s v0, v1, v2[1]
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s16_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_s16_sqrdmulh:
	 0: sqrdmlsh.8h v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s16_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9

---- core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s32_sqrdmulh stdout ----
disassembly for stdarch_test_shim_vqrdmlshq_s32_sqrdmulh:
	 0: sqrdmlsh.4s v0, v1, v2
	 1: ret
thread 'core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s32_sqrdmulh' panicked at 'failed to find instruction `sqrdmulh` in the disassembly', crates/stdarch-test/src/lib.rs:162:9


failures:
    core_arch::aarch64::neon::assert_vld1q_dup_f64_ldr
    core_arch::aarch64::neon::assert_vld1q_lane_f64_ldr
    core_arch::aarch64::neon::generated::assert_vqrdmlahs_lane_s32_sqrdmulh
    core_arch::aarch64::neon::generated::assert_vqrdmlahs_laneq_s32_sqrdmulh
    core_arch::aarch64::neon::generated::assert_vqrdmlshs_lane_s32_sqrdmulh
    core_arch::aarch64::neon::generated::assert_vqrdmlshs_laneq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_lane_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_laneq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlah_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_lane_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_laneq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlahq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_lane_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_laneq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlsh_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_lane_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_laneq_s32_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s16_sqrdmulh
    core_arch::arm_shared::neon::generated::assert_vqrdmlshq_s32_sqrdmulh

test result: FAILED. 6144 passed; 30 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s

Updated 2021-09-21 after test harness fixes.

@hkratz
Copy link
Contributor Author

hkratz commented Sep 7, 2021

    core_arch::arm_shared::neon::assert_vmovl_s16_sxtl
    core_arch::arm_shared::neon::assert_vmovl_s32_sxtl
    core_arch::arm_shared::neon::assert_vmovl_s8_sxtl
    core_arch::arm_shared::neon::assert_vmovl_u16_uxtl
    core_arch::arm_shared::neon::assert_vmovl_u32_uxtl
    core_arch::arm_shared::neon::assert_vmovl_u8_uxtl

Those seem to be OK, uxtl/sxtl are aliases for ushll/sshll. Just need to teach stdarch-test that.

@hkratz
Copy link
Contributor Author

hkratz commented Sep 7, 2021

Not sure what is going with TME tests, compilation seems to work in general: Godbolt. Also tested on a Mac where it leads to a SIGILL abort as expected.

@hkratz
Copy link
Contributor Author

hkratz commented Sep 7, 2021

The culprit seems to be the otool assembly output. Maybe we could use cargo-asm or whatever they use instead?

@hkratz
Copy link
Contributor Author

hkratz commented Sep 7, 2021

#1208 fixes the TME test failures.

Teaching stdarch-test about uxtl/sxtl vs ushll/sshll comes next. The LLVM objdump disassembler produces ushll/sshll instructions while GNU binutils objdump produces uxtl/sxtl. Both should be supported IMHO to make the tests more robust.

@Amanieu
Copy link
Member

Amanieu commented Sep 8, 2021

A lot of the ldr test cases don't actually generate a specific instruction (they usually just move data around). We should replace those with nop to effectively disable the instruction test.

@hkratz
Copy link
Contributor Author

hkratz commented Sep 8, 2021

A lot of the ldr test cases don't actually generate a specific instruction (they usually just move data around). We should replace those with nop to effectively disable the instruction test.

Yes, also for the tests we use the "C" ABI and for that the first vector argument is passed in the V0 register for aarch64, vector results are also returned in V0 and V0 shares the lowest bits with D0 and S0 which are used to return f64/f32 results. That means our test shims for vdup_n_f64, vget_low_f64, vget_low_p64, vmov_n_f64 do not have to do anything (besides the dedup guard code).

@lu-zero lu-zero changed the title Mutliple tests fails on Macos aarch64 Multiple tests fails on Macos aarch64 Sep 11, 2021
@hkratz hkratz changed the title Multiple tests fails on Macos aarch64 Multiple tests fail on Macos aarch64 Sep 14, 2021
@hkratz
Copy link
Contributor Author

hkratz commented Sep 21, 2021

After the test harness fixes error count went from 43 to 30. The vqrdml[as]h intrinsics (correctly) create sqrdmlah and sqrdmlsh instructions because the rdm feature is enabled by default as macos only support v8.1a cpus. With RUSTFLAGS="-C target-feature=-rdm"they go away. We should probably test that those are generated if rdm is enabled but that needs changes to the test fw.

Not sure about the remaining two. They look ok, probably just different instruction selection because of a specific target CPU? According to the ACLE docs the instructions selected for darwin seem to be the correct ones.

@Amanieu
Copy link
Member

Amanieu commented Sep 21, 2021

The disassembly for the last 2 look fine to me: they are using variants of the ld1 instruction to load and insert/replicate instead of a doing this in separate instructions. I'd just change the expected instruction to nop since fundamentally it's just moving data around and not doing any computation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants