<div dir="ltr">So, _mm_prefetch is an <b>Intel</b> intrinsic. You can read about _mm_prefetch <a href="http://software.intel.com/sites/landingpage/IntrinsicsGuide/">here</a>. But for brevity I'll paste it here.<div><h1 style="font-size:14px;font-family:'Neo Sans Intel Medium','Neo Sans Intel Medium IE';font-weight:normal;margin:0px;color:rgb(0,0,0)">
Synopsis</h1><div class="" style="font-family:'Oxygen Mono',sans-serif;padding:10px;line-height:16.639999389648438px;color:rgb(0,0,0);font-size:13px"><span class="" style="color:rgb(102,102,102)"><span class="" style="color:rgb(0,0,136)">void</span> <span class="" style="color:rgb(0,0,0)">_mm_prefetch</span> (<span class="" style="color:rgb(0,0,136)">char const*</span> <span class="" style="color:rgb(0,102,85)">p</span>, <span class="" style="color:rgb(0,0,136)">int</span> <span class="" style="color:rgb(0,102,85)">i</span>)</span><br>
#include "xmmintrin.h"<br>Instruction: prefetchnta mprefetch<br>             prefetcht0 mprefetch<br>             prefetcht1 mprefetch<br>             prefetcht2 mprefetch<br>CPUID Flag : <span class="">SSE</span></div>
<h1 style="font-size:14px;font-family:'Neo Sans Intel Medium','Neo Sans Intel Medium IE';font-weight:normal;margin:0px;color:rgb(0,0,0)">Description</h1><div class="" style="padding:10px;font-size:14px;color:rgb(0,0,0);font-family:'Neo Sans Intel','Neo Sans Intel IE'">
Fetch the line of data from memory that contains address <span class="" style="font-family:'Oxygen Mono',sans-serif;color:rgb(0,102,85)">p</span> to a location in the cache heirarchy specified by the locality hint <span class="" style="font-family:'Oxygen Mono',sans-serif;color:rgb(0,102,85)">i</span>.</div>
</div><div>Basically our current implementation of _mm_prefetch is <i>wrong </i>according to the definition of _mm_prefetch.  I believe that we should fix the code that doesn't use it correctly.</div><div>As a stop-gap, I could add back the macro, but guard it as such:</div>
<div>#ifndef _MSC_VER</div><div><span style="font-family:arial,sans-serif;font-size:13px">#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">#endif</span></div>
<div><br></div><div><font face="arial, sans-serif">-Warren</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 3:27 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class=""><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 3:10 AM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="overflow:hidden">According to Chandler, this might be done by introducing an<br>
additional symbol to a fake type in BuiltinsX86.def and then condition<br>
the type expansion on the platform.</div></blockquote></div><br></div>:: looks at the empty bottle of sake on the table ::</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think you missed the *very significant* waving of hands here. I don't really claim to know the right way to solve this. =D</div>

</div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>