Re: [eigen] Matrix product crashes when compiled with MSVC 2010 in release

[ Thread Index | Date Index | More Archives ]

Here is the failing assembly:

        if(nr==4) traits.acc(C3, alphav, R3);
00123465  movapd      xmm6,xmm0
00123469  mulpd       xmm6,xmmword ptr [C3]
0012346E  addpd       xmm6,xmm7
00123472  add         dword ptr [ebp-3Ch],20h
00123476  add         eax,dword ptr [k]
                  traits.acc(C4, alphav, R4);
00123479  movapd      xmm7,xmm0
0012347D  mulpd       xmm7,xmm4
00123481  movupd      xmm4,xmmword ptr [edi-70h]
00123486  addpd       xmm7,xmm4
0012348A  movapd      xmm2,xmm0
0012348E  mulpd       xmm2,xmmword ptr [C1]
00123496  addpd       xmm2,xmmword ptr [esi+edx]
0012349B  lea         edx,[esi+edx+10h]
                  traits.acc(C5, alphav, R5);

The second last command, the aligned addition creates the mentioned
error. I could only circumventing the crash by changing the
computation of acc(...) - just check the patch I attached.

Just a short question to you Ilya - do you rely on disabling the whole
program optimization? Per default it is enabled if you create a new
solution. That's why we never hit that issue so far. I am saying for
all our unit tests, the compiler settings are mostly on default for
MSVC builds. Testing against all combinations of compiler settings is
not really possible. ;)

- Hauke

Attachment: msvc_sse.patch
Description: Binary data

Mail converted by MHonArc 2.6.19+