Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Marián__VooDooMan__M
New Contributor II
89 Views

MSVC 2013 ICC 15.0: interlocked instructions do not make memory barrier for optimization?

Greetings, I have my own very fast critical section implementation with interlocked intrinsic functions. It seems to be failing. I guess ICC IPO optimizer should invalidate program/variable state when it encounters interlocked intrinsic function, even when they are volatile and not so.
0 Kudos
2 Replies
Light_Intel
Moderator
89 Views

Can you please elaborate what exactly is failing? A test case would do nicely.

Marián__VooDooMan__M
New Contributor II
89 Views

I am using MSVC's functions like "InterlockedIncrement(&m_lock_cnt);" which are opaque so compiler should assume that state was changed. Anyway, it was either a bug in ICC 15, or in my code. However the latest update of ICC 15 is working perfectly, and the problem disappeared. Please, disregard this issue.
Reply