Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icc generates wrong instructions for MIC

Lei_Z_
Beginner
481 Views
Hi, I'm trying to compile some code for MIC, which uses the extended integer type __uint128_t. And icc gave me the following error message: ******** warning #13376: XMM registers are not supported on target platform ******** error #13393: Opcode unsupported on target architecture: movsd I wrote a snippet of sample code, which could reproduce the error: --------------------------------------- #include int main() { double d; __uint128_t i = 0; d = i; printf("%f\n", d); } ---------------------------------------- The code above can be compiled correctly by gcc, as well as by icc when targeting x86 platform instead of MIC. It seems that icc was trying to generate some SSE instructions, which is not supported by MIC. This looks like a bug. I hope your dev team could solve this or give me some workaround. Thanks.
0 Kudos
7 Replies
Lei_Z_
Beginner
481 Views
By the way, the version of icc is 14.0.2.
0 Kudos
Kittur_G_Intel
Employee
481 Views

Hi Lei,
This is a compiler bug that needs to be fixed (looks like generated intrinsic has an issue with register mapping) and have filed the issue with the developers and will get back to you soon to check if there's any workaround. Appreciate your patience through this.
_Kittur

0 Kudos
Kittur_G_Intel
Employee
481 Views

Hi Lei,
As a workaround for this issue you can do the following:
========================

extern double __ntod(__uint128_t);
int main() {

    double d;
    __uint128_t i = 123;

//    d = i;
    d = __ntod(i);

    printf("%e\n", d);
}
=========================

I'll let you know as soon as the release with the fix for this issue is out. Appreciate your patience till then.
_Kittur

0 Kudos
Kittur_G_Intel
Employee
481 Views

Hi,
Let me know if the workaround helps. I'll let you know as soon as the release with the fix is out. Appreciate your patience till then.
_Kittur

0 Kudos
Lei_Z_
Beginner
481 Views
Hi Kittur, Sorry for the late reply. This workaround works fine so far. Thanks for your help. Lei
0 Kudos
Kittur_G_Intel
Employee
481 Views

Hi Lei, 
Glad to hear that the workaround helped. Again, I'll update you as soon as the release with the fix for this issue is out (as mentioned this is a bug in  the compiler) and appreciate your patience till then.
_Kittur 

0 Kudos
Kittur_G_Intel
Employee
481 Views

Hi Lei,
Just letting you know that this issue is fixed in the latest 15 version update 3 that you can download from the Intel Registration Center, thanks.
_Kittur

0 Kudos
Reply