]> granicus.if.org Git - clang/commit
[X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled. Clang...
authorCraig Topper <craig.topper@intel.com>
Sat, 5 Aug 2017 23:35:54 +0000 (23:35 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 5 Aug 2017 23:35:54 +0000 (23:35 +0000)
commitc5d8b4291b0b4844d28f241540f6205584b14051
treee1ed6a179e2940f53b2581a07bb55a5f60b4a3c8
parentb9952538c1ef89d8d7c881fb9a98c0c3d4018d14
[X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled. Clang part

Summary:
On older processors this instruction encoding is treated as a NOP.

MSVC doesn't disable intrinsics based on features the way clang/gcc does. Because the PAUSE instruction encoding doesn't crash older processors, some software out there uses these intrinsics without checking for SSE2.

This change also seems to also be consistent with gcc behavior.

Fixes PR34079

Reviewers: RKSimon, zvi

Reviewed By: RKSimon

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D36362

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310191 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/BuiltinsX86.def
test/CodeGen/pause.c [new file with mode: 0644]