[X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled
authorCraig Topper <craig.topper@intel.com>
Sat, 5 Aug 2017 23:34:44 +0000 (23:34 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 5 Aug 2017 23:34:44 +0000 (23:34 +0000)
commit6bfa2aee78785d340ac185a30c666d22130fe018
treef45f618d0eeea5f581c761643ca534d2dc486d61
parent6b78bac9fb547a215caf787d86564004e89b9bba
[X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled

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: llvm-commits

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

llvm-svn: 310190
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/X86/pause.ll [new file with mode: 0644]