OSDN Git Service

[X86] Add intrinsic support for the RDPID instruction
authorCraig Topper <craig.topper@intel.com>
Thu, 18 Jan 2018 23:52:31 +0000 (23:52 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 18 Jan 2018 23:52:31 +0000 (23:52 +0000)
commit8677133ebc57b0aa622da0ba82fae0ec8182dcbd
treef9e4196215c579344a84d1ce7b480e6be99e80a3
parent807369220f16990fcd329556aca6e23540047020
[X86] Add intrinsic support for the RDPID instruction

This adds a new instrinsic to support the rdpid instruction. The implementation is a bit weird because the intrinsic is defined as always returning 32-bits, but the assembler support thinks the instruction produces a 64-bit register in 64-bit mode. But really it zeros the upper 32 bits. So I had to add separate patterns where 64-bit mode uses an extract_subreg.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322910 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsX86.td
lib/Support/Host.cpp
lib/Target/X86/X86.td
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86InstrSystem.td
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
test/CodeGen/X86/rdpid.ll [new file with mode: 0644]