icc generates wrong instructions for MIC

icc generates wrong instructions for MIC

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.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

By the way, the version of icc is 14.0.2.

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

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

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

Hi Kittur,

Sorry for the late reply. This workaround works fine so far. Thanks for your help.

Lei

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 

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today