[X86] Remove X86 specific dag nodes for RDTSC/RDTSCP/RDPMC. NFCI
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 20 Mar 2019 11:21:15 +0000 (11:21 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 20 Mar 2019 11:21:15 +0000 (11:21 +0000)
commit624f5deff429ac31c5416db5083a8aa9119727db
treef06bee01a40204d203cf03b35866394b296ca6ab
parentd4c80012c0441a88945116dd044eba12464f8a80
[X86] Remove X86 specific dag nodes for RDTSC/RDTSCP/RDPMC. NFCI

This patch removes the following dag node opcodes from namespace X86ISD:

RDTSC_DAG,
RDTSCP_DAG,
RDPMC_DAG

The logic that expands RDTSC/RDPMC/XGETBV intrinsics is basically the same. The
only differences are:

    RDTSC/RDTSCP don't implicitly read ECX.
    RDTSCP also implicitly writes ECX.

I moved the common expansion logic into a helper function with the goal to get
rid of code repetition. That helper is now used for the expansion of
RDTSC/RDTSCP/RDPMC/XGETBV intrinsics.

No functional change intended.

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

llvm-svn: 356546
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86InstrSystem.td
llvm/lib/Target/X86/X86IntrinsicsInfo.h