r201775 - Revert r201734 and r201742.

Warren Hunt whunt at google.com
Thu Feb 20 10:39:50 PST 2014

So, _mm_prefetch is an *Intel* intrinsic. You can read about _mm_prefetch
here <http://software.intel.com/sites/landingpage/IntrinsicsGuide/>. But
for brevity I'll paste it here.
void _mm_prefetch (char const* p, int i)
#include "xmmintrin.h"
Instruction: prefetchnta mprefetch
             prefetcht0 mprefetch
             prefetcht1 mprefetch
             prefetcht2 mprefetch
Fetch the line of data from memory that contains address p to a location in
the cache heirarchy specified by the locality hint i.
Basically our current implementation of _mm_prefetch is *wrong *according
to the definition of _mm_prefetch.  I believe that we should fix the code
that doesn't use it correctly.
As a stop-gap, I could add back the macro, but guard it as such:
#ifndef _MSC_VER
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))


On Thu, Feb 20, 2014 at 3:27 AM, Chandler Carruth <chandlerc at google.com>wrote:

> On Thu, Feb 20, 2014 at 3:10 AM, Daniel Jasper <djasper at google.com> wrote:
>> According to Chandler, this might be done by introducing an
>> additional symbol to a fake type in BuiltinsX86.def and then condition
>> the type expansion on the platform.
> :: looks at the empty bottle of sake on the table ::
> 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
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140220/07868774/attachment.html>

More information about the cfe-commits mailing list