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

Tests: wrong instruction assertions #1209

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

Tests: wrong instruction assertions #1209

hkratz opened this issue Sep 8, 2021 · 2 comments

Comments

@hkratz
Copy link
Contributor

hkratz commented Sep 8, 2021

Many intrinsics have wrong instruction assertions, e.g. all the AVX512 mm512_mask_blend_epi16* check for vmovdqu16 instead of vpblend*, on aarch64 vget_high_p64 tests for ldr instead of ext, etc.

Not sure how to systematically find the ones which are broken, but I can submit fixes for the ones I find.

@Amanieu
Copy link
Member

Amanieu commented Sep 8, 2021

This is somewhat intentional. It turns out that x86 has several instructions which all do the same thing (masked vmovd does the same as vpblend) and the actual instruction selected can vary depending on which CPU is optimized for. There's no real good solution here, so we just picked the instruction that our CI happens to generate.

@workingjubilee
Copy link
Member

on x86_64-pc-windows-msvc using

$Env:TARGET="x86_64-pc-windows-msvc"
$Env:RUSTFLAGS="-Ctarget-feature=+avx2"
cargo test --release

the following tests fail with a wrong instruction assertion:

List of tests
  • core_arch::x86::aes::assert__mm_aesdec_si128_aesdec
  • core_arch::x86::aes::assert__mm_aesdeclast_si128_aesdeclast
  • core_arch::x86::aes::assert__mm_aesenc_si128_aesenc
  • core_arch::x86::aes::assert__mm_aesenclast_si128_aesenclast
  • core_arch::x86::aes::assert__mm_aesimc_si128_aesimc
  • core_arch::x86::aes::assert__mm_aeskeygenassist_si128_aeskeygenassist
  • core_arch::x86::avx::assert__mm256_permute2f128_ps_vperm2f128
  • core_arch::x86::avx::assert__mm256_set1_epi16_vinsertf128
  • core_arch::x86::avx::assert__mm256_set1_epi64x_vinsertf128
  • core_arch::x86::avx::assert__mm256_set1_epi8_vinsertf128
  • core_arch::x86::avx::assert__mm256_set1_epi8_vpshufb
  • core_arch::x86::pclmulqdq::assert__mm_clmulepi64_si128_pclmulqdq
  • core_arch::x86::sse2::assert__mm_add_epi16_paddw
  • core_arch::x86::sse2::assert__mm_add_epi32_paddd
  • core_arch::x86::sse2::assert__mm_add_epi64_paddq
  • core_arch::x86::sse2::assert__mm_add_epi8_paddb
  • core_arch::x86::sse2::assert__mm_add_pd_addpd
  • core_arch::x86::sse2::assert__mm_add_sd_addsd
  • core_arch::x86::sse2::assert__mm_adds_epi16_paddsw
  • core_arch::x86::sse2::assert__mm_adds_epi8_paddsb
  • core_arch::x86::sse2::assert__mm_adds_epu16_paddusw
  • core_arch::x86::sse2::assert__mm_adds_epu8_paddusb
  • core_arch::x86::sse2::assert__mm_and_pd_andps
  • core_arch::x86::sse2::assert__mm_and_si128_andps
  • core_arch::x86::sse2::assert__mm_andnot_pd_andnps
  • core_arch::x86::sse2::assert__mm_andnot_si128_andnps
  • core_arch::x86::sse2::assert__mm_avg_epu16_pavgw
  • core_arch::x86::sse2::assert__mm_avg_epu8_pavgb
  • core_arch::x86::sse2::assert__mm_bslli_si128_pslldq
  • core_arch::x86::sse2::assert__mm_bsrli_si128_psrldq
  • core_arch::x86::sse2::assert__mm_cmpeq_epi16_pcmpeqw
  • core_arch::x86::sse2::assert__mm_cmpeq_epi32_pcmpeqd
  • core_arch::x86::sse2::assert__mm_cmpeq_epi8_pcmpeqb
  • core_arch::x86::sse2::assert__mm_cmpeq_pd_cmpeqpd
  • core_arch::x86::sse2::assert__mm_cmpeq_sd_cmpeqsd
  • core_arch::x86::sse2::assert__mm_cmpge_pd_cmplepd
  • core_arch::x86::sse2::assert__mm_cmpge_sd_cmplesd
  • core_arch::x86::sse2::assert__mm_cmpgt_epi16_pcmpgtw
  • core_arch::x86::sse2::assert__mm_cmpgt_epi32_pcmpgtd
  • core_arch::x86::sse2::assert__mm_cmpgt_epi8_pcmpgtb
  • core_arch::x86::sse2::assert__mm_cmpgt_pd_cmpltpd
  • core_arch::x86::sse2::assert__mm_cmpgt_sd_cmpltsd
  • core_arch::x86::sse2::assert__mm_cmple_pd_cmplepd
  • core_arch::x86::sse2::assert__mm_cmple_sd_cmplesd
  • core_arch::x86::sse2::assert__mm_cmplt_epi16_pcmpgtw
  • core_arch::x86::sse2::assert__mm_cmplt_epi32_pcmpgtd
  • core_arch::x86::sse2::assert__mm_cmplt_epi8_pcmpgtb
  • core_arch::x86::sse2::assert__mm_cmplt_pd_cmpltpd
  • core_arch::x86::sse2::assert__mm_cmplt_sd_cmpltsd
  • core_arch::x86::sse2::assert__mm_cmpneq_pd_cmpneqpd
  • core_arch::x86::sse2::assert__mm_cmpneq_sd_cmpneqsd
  • core_arch::x86::sse2::assert__mm_cmpnge_pd_cmpnlepd
  • core_arch::x86::sse2::assert__mm_cmpnge_sd_cmpnlesd
  • core_arch::x86::sse2::assert__mm_cmpngt_pd_cmpnltpd
  • core_arch::x86::sse2::assert__mm_cmpngt_sd_cmpnltsd
  • core_arch::x86::sse2::assert__mm_cmpnle_pd_cmpnlepd
  • core_arch::x86::sse2::assert__mm_cmpnle_sd_cmpnlesd
  • core_arch::x86::sse2::assert__mm_cmpnlt_pd_cmpnltpd
  • core_arch::x86::sse2::assert__mm_cmpnlt_sd_cmpnltsd
  • core_arch::x86::sse2::assert__mm_cmpord_pd_cmpordpd
  • core_arch::x86::sse2::assert__mm_cmpord_sd_cmpordsd
  • core_arch::x86::sse2::assert__mm_cmpunord_pd_cmpunordpd
  • core_arch::x86::sse2::assert__mm_cmpunord_sd_cmpunordsd
  • core_arch::x86::sse2::assert__mm_comieq_sd_comisd
  • core_arch::x86::sse2::assert__mm_comige_sd_comisd
  • core_arch::x86::sse2::assert__mm_comigt_sd_comisd
  • core_arch::x86::sse2::assert__mm_comile_sd_comisd
  • core_arch::x86::sse2::assert__mm_comilt_sd_comisd
  • core_arch::x86::sse2::assert__mm_comineq_sd_comisd
  • core_arch::x86::sse2::assert__mm_cvtepi32_pd_cvtdq2pd
  • core_arch::x86::sse2::assert__mm_cvtepi32_ps_cvtdq2ps
  • core_arch::x86::sse2::assert__mm_cvtpd_epi32_cvtpd2dq
  • core_arch::x86::sse2::assert__mm_cvtpd_ps_cvtpd2ps
  • core_arch::x86::sse2::assert__mm_cvtps_epi32_cvtps2dq
  • core_arch::x86::sse2::assert__mm_cvtps_pd_cvtps2pd
  • core_arch::x86::sse2::assert__mm_cvtsd_si32_cvtsd2si
  • core_arch::x86::sse2::assert__mm_cvtsd_ss_cvtsd2ss
  • core_arch::x86::sse2::assert__mm_cvtsi32_sd_cvtsi2sd
  • core_arch::x86::sse2::assert__mm_cvtsi32_si128_movd
  • core_arch::x86::sse2::assert__mm_cvtss_sd_cvtss2sd
  • core_arch::x86::sse2::assert__mm_cvttpd_epi32_cvttpd2dq
  • core_arch::x86::sse2::assert__mm_cvttps_epi32_cvttps2dq
  • core_arch::x86::sse2::assert__mm_cvttsd_si32_cvttsd2si
  • core_arch::x86::sse2::assert__mm_div_pd_divpd
  • core_arch::x86::sse2::assert__mm_div_sd_divsd
  • core_arch::x86::sse2::assert__mm_extract_epi16_pextrw
  • core_arch::x86::sse2::assert__mm_insert_epi16_pinsrw
  • core_arch::x86::sse2::assert__mm_load_pd_movaps
  • core_arch::x86::sse2::assert__mm_load_sd_movsd
  • core_arch::x86::sse2::assert__mm_load_si128_movaps
  • core_arch::x86::sse2::assert__mm_loadh_pd_movhps
  • core_arch::x86::sse2::assert__mm_loadl_pd_movlps
  • core_arch::x86::sse2::assert__mm_loadr_pd_movaps
  • core_arch::x86::sse2::assert__mm_loadu_pd_movups
  • core_arch::x86::sse2::assert__mm_loadu_si128_movups
  • core_arch::x86::sse2::assert__mm_madd_epi16_pmaddwd
  • core_arch::x86::sse2::assert__mm_maskmoveu_si128_maskmovdqu
  • core_arch::x86::sse2::assert__mm_max_epi16_pmaxsw
  • core_arch::x86::sse2::assert__mm_max_epu8_pmaxub
  • core_arch::x86::sse2::assert__mm_max_pd_maxpd
  • core_arch::x86::sse2::assert__mm_max_sd_maxsd
  • core_arch::x86::sse2::assert__mm_min_epi16_pminsw
  • core_arch::x86::sse2::assert__mm_min_epu8_pminub
  • core_arch::x86::sse2::assert__mm_min_pd_minpd
  • core_arch::x86::sse2::assert__mm_min_sd_minsd
  • core_arch::x86::sse2::assert__mm_move_sd_movsd
  • core_arch::x86::sse2::assert__mm_movemask_epi8_pmovmskb
  • core_arch::x86::sse2::assert__mm_movemask_pd_movmskpd
  • core_arch::x86::sse2::assert__mm_mul_epu32_pmuludq
  • core_arch::x86::sse2::assert__mm_mul_pd_mulpd
  • core_arch::x86::sse2::assert__mm_mul_sd_mulsd
  • core_arch::x86::sse2::assert__mm_mulhi_epi16_pmulhw
  • core_arch::x86::sse2::assert__mm_mulhi_epu16_pmulhuw
  • core_arch::x86::sse2::assert__mm_mullo_epi16_pmullw
  • core_arch::x86::sse2::assert__mm_or_pd_orps
  • core_arch::x86::sse2::assert__mm_or_si128_orps
  • core_arch::x86::sse2::assert__mm_packs_epi16_packsswb
  • core_arch::x86::sse2::assert__mm_packs_epi32_packssdw
  • core_arch::x86::sse2::assert__mm_packus_epi16_packuswb
  • core_arch::x86::sse2::assert__mm_sad_epu8_psadbw
  • core_arch::x86::sse2::assert__mm_setzero_pd_xorps
  • core_arch::x86::sse2::assert__mm_setzero_si128_xorps
  • core_arch::x86::sse2::assert__mm_shuffle_epi32_pshufd
  • core_arch::x86::sse2::assert__mm_shuffle_pd_shufps
  • core_arch::x86::sse2::assert__mm_shufflehi_epi16_pshufhw
  • core_arch::x86::sse2::assert__mm_shufflelo_epi16_pshuflw
  • core_arch::x86::sse2::assert__mm_sll_epi16_psllw
  • core_arch::x86::sse2::assert__mm_sll_epi32_pslld
  • core_arch::x86::sse2::assert__mm_sll_epi64_psllq
  • core_arch::x86::sse2::assert__mm_slli_epi16_psllw
  • core_arch::x86::sse2::assert__mm_slli_epi32_pslld
  • core_arch::x86::sse2::assert__mm_slli_epi64_psllq
  • core_arch::x86::sse2::assert__mm_slli_si128_pslldq
  • core_arch::x86::sse2::assert__mm_sqrt_pd_sqrtpd
  • core_arch::x86::sse2::assert__mm_sqrt_sd_sqrtsd
  • core_arch::x86::sse2::assert__mm_sra_epi16_psraw
  • core_arch::x86::sse2::assert__mm_sra_epi32_psrad
  • core_arch::x86::sse2::assert__mm_srai_epi16_psraw
  • core_arch::x86::sse2::assert__mm_srai_epi32_psrad
  • core_arch::x86::sse2::assert__mm_srl_epi16_psrlw
  • core_arch::x86::sse2::assert__mm_srl_epi32_psrld
  • core_arch::x86::sse2::assert__mm_srl_epi64_psrlq
  • core_arch::x86::sse2::assert__mm_srli_epi16_psrlw
  • core_arch::x86::sse2::assert__mm_srli_epi32_psrld
  • core_arch::x86::sse2::assert__mm_srli_epi64_psrlq
  • core_arch::x86::sse2::assert__mm_srli_si128_psrldq
  • core_arch::x86::sse2::assert__mm_store_pd_movaps
  • core_arch::x86::sse2::assert__mm_store_si128_movaps
  • core_arch::x86::sse2::assert__mm_storeu_pd_movups
  • core_arch::x86::sse2::assert__mm_storeu_si128_movups
  • core_arch::x86::sse2::assert__mm_stream_pd_movntps
  • core_arch::x86::sse2::assert__mm_stream_si128_movntps
  • core_arch::x86::sse2::assert__mm_sub_epi16_psubw
  • core_arch::x86::sse2::assert__mm_sub_epi32_psubd
  • core_arch::x86::sse2::assert__mm_sub_epi64_psubq
  • core_arch::x86::sse2::assert__mm_sub_epi8_psubb
  • core_arch::x86::sse2::assert__mm_sub_pd_subpd
  • core_arch::x86::sse2::assert__mm_sub_sd_subsd
  • core_arch::x86::sse2::assert__mm_subs_epi16_psubsw
  • core_arch::x86::sse2::assert__mm_subs_epi8_psubsb
  • core_arch::x86::sse2::assert__mm_subs_epu16_psubusw
  • core_arch::x86::sse2::assert__mm_subs_epu8_psubusb
  • core_arch::x86::sse2::assert__mm_ucomieq_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_ucomige_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_ucomigt_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_ucomile_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_ucomilt_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_ucomineq_sd_ucomisd
  • core_arch::x86::sse2::assert__mm_unpackhi_epi16_punpckhwd
  • core_arch::x86::sse2::assert__mm_unpackhi_epi32_unpckhps
  • core_arch::x86::sse2::assert__mm_unpackhi_epi64_unpckhpd
  • core_arch::x86::sse2::assert__mm_unpackhi_epi8_punpckhbw
  • core_arch::x86::sse2::assert__mm_unpackhi_pd_unpckhpd
  • core_arch::x86::sse2::assert__mm_unpacklo_epi16_punpcklwd
  • core_arch::x86::sse2::assert__mm_unpacklo_epi32_unpcklps
  • core_arch::x86::sse2::assert__mm_unpacklo_epi8_punpcklbw
  • core_arch::x86::sse2::assert__mm_xor_pd_xorps
  • core_arch::x86::sse2::assert__mm_xor_si128_xorps
  • core_arch::x86::sse3::assert__mm_addsub_pd_addsubpd
  • core_arch::x86::sse3::assert__mm_addsub_ps_addsubps
  • core_arch::x86::sse3::assert__mm_hadd_pd_haddpd
  • core_arch::x86::sse3::assert__mm_hadd_ps_haddps
  • core_arch::x86::sse3::assert__mm_hsub_pd_hsubpd
  • core_arch::x86::sse3::assert__mm_hsub_ps_hsubps
  • core_arch::x86::sse3::assert__mm_lddqu_si128_lddqu
  • core_arch::x86::sse3::assert__mm_loaddup_pd_movddup
  • core_arch::x86::sse3::assert__mm_movedup_pd_movddup
  • core_arch::x86::sse3::assert__mm_movehdup_ps_movshdup
  • core_arch::x86::sse3::assert__mm_moveldup_ps_movsldup
  • core_arch::x86::sse41::assert__mm_blend_epi16_blendps
  • core_arch::x86::sse41::assert__mm_blend_pd_blendps
  • core_arch::x86::sse41::assert__mm_blend_ps_blendps
  • core_arch::x86::sse41::assert__mm_blendv_epi8_pblendvb
  • core_arch::x86::sse41::assert__mm_blendv_pd_blendvpd
  • core_arch::x86::sse41::assert__mm_blendv_ps_blendvps
  • core_arch::x86::sse41::assert__mm_ceil_pd_roundpd
  • core_arch::x86::sse41::assert__mm_ceil_ps_roundps
  • core_arch::x86::sse41::assert__mm_ceil_sd_roundsd
  • core_arch::x86::sse41::assert__mm_ceil_ss_roundss
  • core_arch::x86::sse41::assert__mm_cmpeq_epi64_pcmpeqq
  • core_arch::x86::sse41::assert__mm_cvtepi16_epi32_pmovsxwd
  • core_arch::x86::sse41::assert__mm_cvtepi16_epi64_pmovsxwq
  • core_arch::x86::sse41::assert__mm_cvtepi32_epi64_pmovsxdq
  • core_arch::x86::sse41::assert__mm_cvtepi8_epi16_pmovsxbw
  • core_arch::x86::sse41::assert__mm_cvtepi8_epi32_pmovsxbd
  • core_arch::x86::sse41::assert__mm_cvtepi8_epi64_pmovsxbq
  • core_arch::x86::sse41::assert__mm_cvtepu16_epi32_pmovzxwd
  • core_arch::x86::sse41::assert__mm_cvtepu16_epi64_pmovzxwq
  • core_arch::x86::sse41::assert__mm_cvtepu32_epi64_pmovzxdq
  • core_arch::x86::sse41::assert__mm_cvtepu8_epi16_pmovzxbw
  • core_arch::x86::sse41::assert__mm_cvtepu8_epi32_pmovzxbd
  • core_arch::x86::sse41::assert__mm_cvtepu8_epi64_pmovzxbq
  • core_arch::x86::sse41::assert__mm_dp_pd_dppd
  • core_arch::x86::sse41::assert__mm_dp_ps_dpps
  • core_arch::x86::sse41::assert__mm_extract_epi8_pextrb
  • core_arch::x86::sse41::assert__mm_floor_pd_roundpd
  • core_arch::x86::sse41::assert__mm_floor_ps_roundps
  • core_arch::x86::sse41::assert__mm_floor_sd_roundsd
  • core_arch::x86::sse41::assert__mm_floor_ss_roundss
  • core_arch::x86::sse41::assert__mm_insert_epi32_pinsrd
  • core_arch::x86::sse41::assert__mm_insert_epi8_pinsrb
  • core_arch::x86::sse41::assert__mm_insert_ps_insertps
  • core_arch::x86::sse41::assert__mm_max_epi32_pmaxsd
  • core_arch::x86::sse41::assert__mm_max_epi8_pmaxsb
  • core_arch::x86::sse41::assert__mm_max_epu16_pmaxuw
  • core_arch::x86::sse41::assert__mm_max_epu32_pmaxud
  • core_arch::x86::sse41::assert__mm_min_epi32_pminsd
  • core_arch::x86::sse41::assert__mm_min_epi8_pminsb
  • core_arch::x86::sse41::assert__mm_min_epu16_pminuw
  • core_arch::x86::sse41::assert__mm_min_epu32_pminud
  • core_arch::x86::sse41::assert__mm_minpos_epu16_phminposuw
  • core_arch::x86::sse41::assert__mm_mpsadbw_epu8_mpsadbw
  • core_arch::x86::sse41::assert__mm_mul_epi32_pmuldq
  • core_arch::x86::sse41::assert__mm_mullo_epi32_pmulld
  • core_arch::x86::sse41::assert__mm_packus_epi32_packusdw
  • core_arch::x86::sse41::assert__mm_round_pd_roundpd
  • core_arch::x86::sse41::assert__mm_round_ps_roundps
  • core_arch::x86::sse41::assert__mm_round_sd_roundsd
  • core_arch::x86::sse41::assert__mm_round_ss_roundss
  • core_arch::x86::sse41::assert__mm_test_all_ones_pcmpeqd
  • core_arch::x86::sse41::assert__mm_test_all_ones_ptest
  • core_arch::x86::sse41::assert__mm_test_all_zeros_ptest
  • core_arch::x86::sse41::assert__mm_test_mix_ones_zeros_ptest
  • core_arch::x86::sse41::assert__mm_testc_si128_ptest
  • core_arch::x86::sse41::assert__mm_testnzc_si128_ptest
  • core_arch::x86::sse41::assert__mm_testz_si128_ptest
  • core_arch::x86::sse42::assert__mm_cmpestra_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpestrc_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpestri_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpestrm_pcmpestrm
  • core_arch::x86::sse42::assert__mm_cmpestro_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpestrs_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpestrz_pcmpestri
  • core_arch::x86::sse42::assert__mm_cmpgt_epi64_pcmpgtq
  • core_arch::x86::sse42::assert__mm_cmpistra_pcmpistri
  • core_arch::x86::sse42::assert__mm_cmpistrc_pcmpistri
  • core_arch::x86::sse42::assert__mm_cmpistri_pcmpistri
  • core_arch::x86::sse42::assert__mm_cmpistrm_pcmpistrm
  • core_arch::x86::sse42::assert__mm_cmpistro_pcmpistri
  • core_arch::x86::sse42::assert__mm_cmpistrs_pcmpistri
  • core_arch::x86::sse42::assert__mm_cmpistrz_pcmpistri
  • core_arch::x86::sse::assert__mm_add_ps_addps
  • core_arch::x86::sse::assert__mm_add_ss_addss
  • core_arch::x86::sse::assert__mm_and_ps_andps
  • core_arch::x86::sse::assert__mm_andnot_ps_andnps
  • core_arch::x86::sse::assert__mm_cmpeq_ps_cmpeqps
  • core_arch::x86::sse::assert__mm_cmpeq_ss_cmpeqss
  • core_arch::x86::sse::assert__mm_cmpge_ps_cmpleps
  • core_arch::x86::sse::assert__mm_cmpge_ss_cmpless
  • core_arch::x86::sse::assert__mm_cmpgt_ps_cmpltps
  • core_arch::x86::sse::assert__mm_cmpgt_ss_cmpltss
  • core_arch::x86::sse::assert__mm_cmple_ps_cmpleps
  • core_arch::x86::sse::assert__mm_cmple_ss_cmpless
  • core_arch::x86::sse::assert__mm_cmplt_ps_cmpltps
  • core_arch::x86::sse::assert__mm_cmplt_ss_cmpltss
  • core_arch::x86::sse::assert__mm_cmpneq_ps_cmpneqps
  • core_arch::x86::sse::assert__mm_cmpneq_ss_cmpneqss
  • core_arch::x86::sse::assert__mm_cmpnge_ps_cmpnleps
  • core_arch::x86::sse::assert__mm_cmpnge_ss_cmpnless
  • core_arch::x86::sse::assert__mm_cmpngt_ps_cmpnltps
  • core_arch::x86::sse::assert__mm_cmpngt_ss_cmpnltss
  • core_arch::x86::sse::assert__mm_cmpnle_ps_cmpnleps
  • core_arch::x86::sse::assert__mm_cmpnle_ss_cmpnless
  • core_arch::x86::sse::assert__mm_cmpnlt_ps_cmpnltps
  • core_arch::x86::sse::assert__mm_cmpnlt_ss_cmpnltss
  • core_arch::x86::sse::assert__mm_cmpord_ps_cmpordps
  • core_arch::x86::sse::assert__mm_cmpord_ss_cmpordss
  • core_arch::x86::sse::assert__mm_cmpunord_ps_cmpunordps
  • core_arch::x86::sse::assert__mm_cmpunord_ss_cmpunordss
  • core_arch::x86::sse::assert__mm_comieq_ss_comiss
  • core_arch::x86::sse::assert__mm_comige_ss_comiss
  • core_arch::x86::sse::assert__mm_comigt_ss_comiss
  • core_arch::x86::sse::assert__mm_comile_ss_comiss
  • core_arch::x86::sse::assert__mm_comilt_ss_comiss
  • core_arch::x86::sse::assert__mm_comineq_ss_comiss
  • core_arch::x86::sse::assert__mm_cvt_si2ss_cvtsi2ss
  • core_arch::x86::sse::assert__mm_cvt_ss2si_cvtss2si
  • core_arch::x86::sse::assert__mm_cvtsi32_ss_cvtsi2ss
  • core_arch::x86::sse::assert__mm_cvtss_si32_cvtss2si
  • core_arch::x86::sse::assert__mm_cvtt_ss2si_cvttss2si
  • core_arch::x86::sse::assert__mm_cvttss_si32_cvttss2si
  • core_arch::x86::sse::assert__mm_div_ps_divps
  • core_arch::x86::sse::assert__mm_div_ss_divss
  • core_arch::x86::sse::assert__mm_getcsr_stmxcsr
  • core_arch::x86::sse::assert__mm_load1_ps_movss
  • core_arch::x86::sse::assert__mm_load_ps1_movss
  • core_arch::x86::sse::assert__mm_load_ps_movaps
  • core_arch::x86::sse::assert__mm_load_ss_movss
  • core_arch::x86::sse::assert__mm_loadr_ps_movaps
  • core_arch::x86::sse::assert__mm_loadu_ps_movups
  • core_arch::x86::sse::assert__mm_max_ps_maxps
  • core_arch::x86::sse::assert__mm_max_ss_maxss
  • core_arch::x86::sse::assert__mm_min_ps_minps
  • core_arch::x86::sse::assert__mm_min_ss_minss
  • core_arch::x86::sse::assert__mm_move_ss_movss
  • core_arch::x86::sse::assert__mm_movemask_ps_movmskps
  • core_arch::x86::sse::assert__mm_mul_ps_mulps
  • core_arch::x86::sse::assert__mm_mul_ss_mulss
  • core_arch::x86::sse::assert__mm_or_ps_orps
  • core_arch::x86::sse::assert__mm_rcp_ps_rcpps
  • core_arch::x86::sse::assert__mm_rcp_ss_rcpss
  • core_arch::x86::sse::assert__mm_rsqrt_ps_rsqrtps
  • core_arch::x86::sse::assert__mm_rsqrt_ss_rsqrtss
  • core_arch::x86::sse::assert__mm_set1_ps_shufps
  • core_arch::x86::sse::assert__mm_set_ps1_shufps
  • core_arch::x86::sse::assert__mm_set_ps_unpcklps
  • core_arch::x86::sse::assert__mm_set_ss_movss
  • core_arch::x86::sse::assert__mm_setcsr_ldmxcsr
  • core_arch::x86::sse::assert__mm_setr_ps_unpcklps
  • core_arch::x86::sse::assert__mm_setzero_ps_xorps
  • core_arch::x86::sse::assert__mm_shuffle_ps_shufps
  • core_arch::x86::sse::assert__mm_sqrt_ps_sqrtps
  • core_arch::x86::sse::assert__mm_sqrt_ss_sqrtss
  • core_arch::x86::sse::assert__mm_store1_ps_movaps
  • core_arch::x86::sse::assert__mm_store_ps1_movaps
  • core_arch::x86::sse::assert__mm_store_ps_movaps
  • core_arch::x86::sse::assert__mm_store_ss_movss
  • core_arch::x86::sse::assert__mm_storer_ps_movaps
  • core_arch::x86::sse::assert__mm_storeu_ps_movups
  • core_arch::x86::sse::assert__mm_stream_ps_movntps
  • core_arch::x86::sse::assert__mm_sub_ps_subps
  • core_arch::x86::sse::assert__mm_sub_ss_subss
  • core_arch::x86::sse::assert__mm_ucomieq_ss_ucomiss
  • core_arch::x86::sse::assert__mm_ucomige_ss_ucomiss
  • core_arch::x86::sse::assert__mm_ucomigt_ss_ucomiss
  • core_arch::x86::sse::assert__mm_ucomile_ss_ucomiss
  • core_arch::x86::sse::assert__mm_ucomilt_ss_ucomiss
  • core_arch::x86::sse::assert__mm_ucomineq_ss_ucomiss
  • core_arch::x86::sse::assert__mm_unpackhi_ps_unpckhps
  • core_arch::x86::sse::assert__mm_unpacklo_ps_unpcklps
  • core_arch::x86::sse::assert__mm_xor_ps_xorps
  • core_arch::x86::ssse3::assert__mm_abs_epi16_pabsw
  • core_arch::x86::ssse3::assert__mm_abs_epi32_pabsd
  • core_arch::x86::ssse3::assert__mm_abs_epi8_pabsb
  • core_arch::x86::ssse3::assert__mm_alignr_epi8_palignr
  • core_arch::x86::ssse3::assert__mm_hadd_epi16_phaddw
  • core_arch::x86::ssse3::assert__mm_hadd_epi32_phaddd
  • core_arch::x86::ssse3::assert__mm_hadds_epi16_phaddsw
  • core_arch::x86::ssse3::assert__mm_hsub_epi16_phsubw
  • core_arch::x86::ssse3::assert__mm_hsub_epi32_phsubd
  • core_arch::x86::ssse3::assert__mm_hsubs_epi16_phsubsw
  • core_arch::x86::ssse3::assert__mm_maddubs_epi16_pmaddubsw
  • core_arch::x86::ssse3::assert__mm_mulhrs_epi16_pmulhrsw
  • core_arch::x86::ssse3::assert__mm_shuffle_epi8_pshufb
  • core_arch::x86::ssse3::assert__mm_sign_epi16_psignw
  • core_arch::x86::ssse3::assert__mm_sign_epi32_psignd
  • core_arch::x86::ssse3::assert__mm_sign_epi8_psignb
  • core_arch::x86_64::sse2::assert__mm_cvtsd_si64_cvtsd2si
  • core_arch::x86_64::sse2::assert__mm_cvtsd_si64x_cvtsd2si
  • core_arch::x86_64::sse2::assert__mm_cvtsi64_sd_cvtsi2sd
  • core_arch::x86_64::sse2::assert__mm_cvtsi64x_sd_cvtsi2sd
  • core_arch::x86_64::sse2::assert__mm_cvttsd_si64_cvttsd2si
  • core_arch::x86_64::sse2::assert__mm_cvttsd_si64x_cvttsd2si
  • core_arch::x86_64::sse41::assert__mm_insert_epi64_pinsrq
  • core_arch::x86_64::sse::assert__mm_cvtsi64_ss_cvtsi2ss
  • core_arch::x86_64::sse::assert__mm_cvtss_si64_cvtss2si
  • core_arch::x86_64::sse::assert__mm_cvttss_si64_cvttss2si

Using RUSTFLAGS="-Ctarget-feature=+sse4.2" cargo test --release the list is much smaller:

List of tests
  • core_arch::x86::sse2::assert__mm_move_sd_movsd
  • core_arch::x86::sse2::assert__mm_shuffle_pd_shufps
  • core_arch::x86::sse::assert__mm_move_ss_movss
  • core_arch::x86::sse::assert__mm_set_ps_unpcklps
  • core_arch::x86::sse::assert__mm_set_ss_movss
  • core_arch::x86::sse::assert__mm_setr_ps_unpcklps

Almost all of the ones follow a format something like:


---- core_arch::x86::ssse3::assert__mm_hsubs_epi16_phsubsw stdout ----
disassembly for stdarch_test_shim__mm_hsubs_epi16_phsubsw:
         0: lea rax,[14025F654h]
         1: mov rcx,qword ptr [__imp__ZN12stdarch_test11_DONT_DEDUP17h32f1f622202c133cE]
         2: mov qword ptr [rcx],rax
         3: vphsubsw xmm0,xmm0,xmm1
         4: ret
         5: IIIIIIIII
thread 'core_arch::x86::ssse3::assert__mm_hsubs_epi16_phsubsw' panicked at 'failed to find instruction `phsubsw` in the disassembly', crates\stdarch-test\src\lib.rs:165:9

For the first set, LLVM is clearly exploiting the fact that a given set of instructions was enabled for the compilation and is emitting the VEX prefixed version of instructions. The assertions weren't prepared for it and I think it broke something else, but honestly, I want to pat it on its head and say "good dragon!" I am less confident about what to make of the other set.

Without optimizations or features on, most everything passes except for this, and I don't know if this is related:

thread 'core_arch::x86::xsave::tests::xsavec' panicked at 'assertion failed: (left == right)

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

3 participants