microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.51k stars 231 forks source link

Errors from the Testsuite GCC 13.2.0 #186

Open JPeterMugaas opened 5 months ago

JPeterMugaas commented 5 months ago

I was running the testsuite on GNU GCC 13.2.0 and I got these errors:

***************
*************
howdy, from the PC
        Testing DirectX Math (aka XNAMath 3) 318
        SSE_INTRINSICS
Warning: Couldn't open math2.dat. f==0

[..]
XMVectorPermute: 3 3 6 6 = 0.000000 0.000000 -0.000000 -0.000000 ... 3.000000 3.000000 6.000000 6.00
0000
XMVectorPermute: 3 2 4 2 = 0.000000 0.000000 0.000000 0.000000 ... 3.000000 2.000000 4.000000 2.0000
00
XMVectorPermute: 1 2 7 1 = -14743.487305 0.000000 0.000000 -14743.487305 ... 1.000000 2.000000 7.000
000 1.000000
XMVectorPermute: 2 4 2 2 = 0.000000 0.000000 0.000000 0.000000 ... 2.000000 4.000000 2.000000 2.0000
00
XMVectorPermute: 4 2 4 5 = 0.000000 0.000000 0.000000 0.000000 ... 4.000000 2.000000 4.000000 5.0000
00
XMVectorPermute: 4 4 7 2 = 0.000000 0.000000 0.000000 0.000000 ... 4.000000 4.000000 7.000000 2.0000
00
XMVectorPermute: 4 5 4 4 = 0.000000 0.000000 0.000000 0.000000 ... 4.000000 5.000000 4.000000 4.0000
00
XMVectorPermute: 7 1 3 7 = 0.000000 -14743.487305 0.000000 0.000000 ... 7.000000 1.000000 3.000000 7
.000000
   test 321 (XMVectorPermute) FAILED

The tests run fine with Clang.

walbourn commented 5 months ago

Is this in DEBUG or RELEASE builds?

The DirectXMath library exercises a lot of intrinsics code-gen, so it has definitely found a lot of compiler bugs over the years.

JPeterMugaas commented 5 months ago

Release

walbourn commented 4 months ago

This is pretty clearly a compiler optimization bug. Perhaps you should file it with the GNUC/MinGW folks and link the report here.