Skip to content

Commit 1b9be55

Browse files
authored
Add new feature flags to can_run_code in simd_op_check.h (#8853)
1 parent fe0542f commit 1b9be55

8 files changed

Lines changed: 32 additions & 0 deletions

test/correctness/simd_op_check.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ class SimdOpCheckTest {
137137
Target::AVX512_KNL,
138138
Target::AVX512_SapphireRapids,
139139
Target::AVX512_Skylake,
140+
Target::AVX512_Zen4,
141+
Target::AVX512_Zen5,
142+
Target::AVXVNNI,
140143
Target::F16C,
141144
Target::FMA,
142145
Target::FMA4,

test/correctness/simd_op_check_arm.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,10 @@ int main(int argc, char **argv) {
11451145
return SimdOpCheckTest::main<SimdOpCheckARM>(
11461146
argc, argv,
11471147
{
1148+
// IMPORTANT:
1149+
// When adding new targets here, make sure to also update
1150+
// can_run_code in simd_op_check.h to include any new features used.
1151+
11481152
Target("arm-32-linux"),
11491153
Target("arm-64-linux"),
11501154
Target("arm-64-linux-arm_dot_prod"),

test/correctness/simd_op_check_hvx.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,10 @@ int main(int argc, char **argv) {
715715
return SimdOpCheckTest::main<SimdOpCheckHVX>(
716716
argc, argv,
717717
{
718+
// IMPORTANT:
719+
// When adding new targets here, make sure to also update
720+
// can_run_code in simd_op_check.h to include any new features used.
721+
718722
Target("hexagon-32-noos-hvx"),
719723
Target("hexagon-32-noos-hvx-hvx_128"),
720724
Target("hexagon-32-noos-hvx-hvx_128-hvx_v62"),

test/correctness/simd_op_check_powerpc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ int main(int argc, char **argv) {
137137
return SimdOpCheckTest::main<SimdOpCheckPowerPC>(
138138
argc, argv,
139139
{
140+
// IMPORTANT:
141+
// When adding new targets here, make sure to also update
142+
// can_run_code in simd_op_check.h to include any new features used.
143+
140144
Target("powerpc-32-linux"),
141145
Target("powerpc-32-linux-vsx"),
142146
Target("powerpc-32-linux-power_arch_2_07"),

test/correctness/simd_op_check_riscv.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ int main(int argc, char **argv) {
138138
return SimdOpCheckTest::main<SimdOpCheckRISCV>(
139139
argc, argv,
140140
{
141+
// IMPORTANT:
142+
// When adding new targets here, make sure to also update
143+
// can_run_code in simd_op_check.h to include any new features used.
144+
141145
Target("riscv-64-linux-rvv-vector_bits_128"),
142146
Target("riscv-64-linux-rvv-vector_bits_512"),
143147
});

test/correctness/simd_op_check_sve2.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,10 @@ int main(int argc, char **argv) {
13781378
return SimdOpCheckTest::main<SimdOpCheckArmSve>(
13791379
argc, argv,
13801380
{
1381+
// IMPORTANT:
1382+
// When adding new targets here, make sure to also update
1383+
// can_run_code in simd_op_check.h to include any new features used.
1384+
13811385
Target("arm-64-linux-sve2-no_neon-vector_bits_128"),
13821386
Target("arm-64-linux-sve2-no_neon-vector_bits_256"),
13831387
});

test/correctness/simd_op_check_wasm.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,10 @@ int main(int argc, char **argv) {
544544
return SimdOpCheckTest::main<SimdOpCheckWASM>(
545545
argc, argv,
546546
{
547+
// IMPORTANT:
548+
// When adding new targets here, make sure to also update
549+
// can_run_code in simd_op_check.h to include any new features used.
550+
547551
Target("wasm-32-wasmrt"),
548552
Target("wasm-32-wasmrt-wasm_simd128"),
549553
Target("wasm-32-wasmrt-wasm_mvponly"),

test/correctness/simd_op_check_x86.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ int main(int argc, char **argv) {
702702
return SimdOpCheckTest::main<SimdOpCheckX86>(
703703
argc, argv,
704704
{
705+
// IMPORTANT:
706+
// When adding new targets here, make sure to also update
707+
// can_run_code in simd_op_check.h to include any new features used.
708+
705709
Target("x86-32-linux"),
706710
Target("x86-32-linux-sse41"),
707711
// Always turn on f16c when using avx. Sandy Bridge had avx without
@@ -718,6 +722,7 @@ int main(int argc, char **argv) {
718722
Target("x86-64-linux-sse41-avx-f16c-fma-avx2-avx512-avx512_skylake-avx512_cannonlake-avx512_zen4"),
719723
Target("x86-64-linux-sse41-avx-f16c-fma-avx2-avxvnni-avx512-avx512_skylake-avx512_cannonlake-avx512_zen4-avx512_zen5"),
720724
Target("x86-64-linux-sse41-avx-f16c-fma-avx2-avxvnni-avx512-avx512_skylake-avx512_cannonlake-avx512_zen4-avx512_sapphirerapids"),
725+
721726
// Can be enabled when AVX10 and APX support are stable in LLVM.
722727
// Target("x86-64-linux-avx10_1-vector_bits_256-x86apx"),
723728
});

0 commit comments

Comments
 (0)