godsic

AMD SIMD bug!

Discussion created by godsic on Mar 12, 2009
Latest reply on Mar 25, 2009 by indi123

Hello.

I think I find bug in AMD K11 (or maybe all others generations).

I programm some code and spent 4h to find bug in my code, which is was like that:

{

...

_mm_store_sd(&v[1],XMM0)

_mm_storeh_pd(&v[0],XMM0)

}

I always use such combinations to store in MEM if there is no way to optimization (also such structure cost me less than _mm_shuffle+_mm_store_pd) and on x86 OS it is work perfect, but when I recompile my program for x64 I notice incorrect results in my prog, so I try to find and correct my errors for 4h, after all I am just try to change this code to

{

...

XMM1=_mm_shuffle_pd(XMM0,XMM0,_MM_SHUFFLE2(0,1));

_mm_store_pd(&v[0],XMM1);

}

After my program runs correctly. I suggest that this is bug in SIMD pipeline (probably instructions decoder).

Is anybody from AMD CPU part can accept this information?

Outcomes