Skip to content

Commit

Permalink
Fix incorrect instruction mnemonic in exegesis annotator test (#264)
Browse files Browse the repository at this point in the history
vmovdqu does not work with the 128-bit/256-bit AVX512 registers. Switch
the instruction so that the test actually works on system with AVX512VL
support. This was causing test failures on system with AVX512. I did not
catch this originally as I was testing on znver2.
  • Loading branch information
boomanaiden154 authored Nov 27, 2024
1 parent e21ea34 commit 4d59145
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gematria/datasets/find_accessed_addrs_exegesis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ TEST_F(FindAccessedAddrsExegesisTest, STRegister) {
TEST_F(FindAccessedAddrsExegesisTest, AVX512XMMYMMRegisters) {
// This test requires AVX512, skip if we are not running on a CPU with
// AVX512F.
if (!__builtin_cpu_supports("avx512f")) {
GTEST_SKIP() << "CPU does not support AVX512, skipping.";
if (!__builtin_cpu_supports("avx512vl")) {
GTEST_SKIP() << "CPU does not support AVX512VL, skipping.";
}

auto AddrsOrErr = FindAccessedAddrsExegesis(R"asm(
vmovdqu %xmm16, (%rax)
vmovdqu %ymm16, (%rax)
vmovdqu32 %xmm16, (%rax)
vmovdqu32 %ymm16, (%rax)
)asm");
ASSERT_TRUE(static_cast<bool>(AddrsOrErr));
EXPECT_THAT(
Expand Down

0 comments on commit 4d59145

Please sign in to comment.