@@ -72,20 +72,22 @@ jobs:
7272 #include <stdio.h>
7373
7474 int main() {
75- // Simple test to see if AVX intrinsics compile on Arm
76- __m128 a = _mm_set_ps(1.0, 2.0, 3.0, 4.0);
77- __m128 b = _mm_set_ps(4.0, 3.0, 2.0, 1.0);
78- __m128 c = _mm_add_ps(a, b);
75+ // Test AVX intrinsics (AvxToNeon target)
76+ // _mm256_set1_ps and _mm256_add_ps are AVX
77+ __m256 a = _mm256_set1_ps(1.0f);
78+ __m256 b = _mm256_set1_ps(2.0f);
79+ __m256 c = _mm256_add_ps(a, b);
7980
80- float res[4 ];
81- _mm_store_ps (res, c);
81+ float res[8 ];
82+ _mm256_storeu_ps (res, c);
8283
83- printf("Result: %f %f %f %f \n", res[0], res[1], res[2], res[3 ]);
84+ printf("Result: %f\n", res[0]);
8485 return 0;
8586 }
8687 EOF
8788
88- # Compile with -O3 to enable vectorization if needed, but mainly checking header compat
89+ # Compile with -O3 to enable vectorization if needed
90+ # Note: AvxToNeon is a header-only library that translates AVX to Neon intrinsics
8991 if g++ -O3 -o test_avx test_avx.cpp; then
9092 echo "✓ compilation passed"
9193 echo "status=passed" >> $GITHUB_OUTPUT
@@ -106,8 +108,8 @@ jobs:
106108 OUTPUT=$(./test_avx)
107109 echo "Output: $OUTPUT"
108110
109- # Expected result is 5.0 5 .0 5.0 5.0 (since 1+4, 2+3, 3+2, 4+1 )
110- if echo "$OUTPUT" | grep -q "5.000000 5.000000 5.000000 5 .000000"; then
111+ # Expected result is 3.000000 (1 .0 + 2.0 )
112+ if echo "$OUTPUT" | grep -q "3 .000000"; then
111113 echo "✓ execution passed"
112114 echo "status=passed" >> $GITHUB_OUTPUT
113115 else
0 commit comments