This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add missing _m_prefetch intrinsic
ClosedPublic

Authored by RKSimon on Jul 19 2015, 3:12 AM.

Details

Summary

The 3DNOW/PRFCHW cpu targets define both the PREFETCHW (set cache line modified) and PREFETCH (set cache line exclusive) instructions but only the _m_prefetchw (PREFETCHW) intrinsic is included in the header. This patch adds the missing _m_prefetch intrinsic.

I'm basing this off AMD documentation - the intel docs on the support for PREFETCHW isn't clear whether Silvermont/Broadwell properly support PREFETCH but given that the intrinsic implementation is a default __builtin_prefetch call, it is safe whatever.

Fix for PR23648

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 30112.Jul 19 2015, 3:12 AM
RKSimon retitled this revision from to [X86] Add missing _m_prefetch intrinsic.
RKSimon updated this object.
RKSimon added reviewers: majnemer, echristo, silvas.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: cfe-commits.
echristo accepted this revision.Jul 27 2015, 11:01 AM
echristo edited edge metadata.

LGTM.

-eric

This revision is now accepted and ready to land.Jul 27 2015, 11:01 AM
This revision was automatically updated to reflect the committed changes.