summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86RegisterBankInfo.cpp
diff options
context:
space:
mode:
authorIgor Breger <igor.breger@intel.com>2017-09-13 09:05:23 +0000
committerIgor Breger <igor.breger@intel.com>2017-09-13 09:05:23 +0000
commit5c721199dde0341e34e97b892763947448729430 (patch)
treee2c2eea6414dc8b36043835544fa2da65f658382 /llvm/lib/Target/X86/X86RegisterBankInfo.cpp
parent5d5da5f5315d564a14ccb8b050b24d3a6488f0da (diff)
downloadbcm5719-llvm-5c721199dde0341e34e97b892763947448729430.tar.gz
bcm5719-llvm-5c721199dde0341e34e97b892763947448729430.zip
[GlobalISel][X86] support G_FPEXT operation.
Summary: Support G_FPEXT operation. Selection done via TableGen'erated code. Reviewers: zvi, guyblank, aymanmus, m_zuckerman Reviewed By: zvi Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34816 llvm-svn: 313135
Diffstat (limited to 'llvm/lib/Target/X86/X86RegisterBankInfo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86RegisterBankInfo.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterBankInfo.cpp b/llvm/lib/Target/X86/X86RegisterBankInfo.cpp
index ecb7be9b311..3fc837478ca 100644
--- a/llvm/lib/Target/X86/X86RegisterBankInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterBankInfo.cpp
@@ -182,10 +182,18 @@ X86RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
}
unsigned NumOperands = MI.getNumOperands();
-
- // Track the bank of each register, use NotFP mapping (all scalars in GPRs)
SmallVector<PartialMappingIdx, 4> OpRegBankIdx(NumOperands);
- getInstrPartialMappingIdxs(MI, MRI, /* isFP */ false, OpRegBankIdx);
+
+ switch (Opc) {
+ case TargetOpcode::G_FPEXT:
+ // Instruction having only floating-point operands (all scalars in VECRReg)
+ getInstrPartialMappingIdxs(MI, MRI, /* isFP */ true, OpRegBankIdx);
+ break;
+ default:
+ // Track the bank of each register, use NotFP mapping (all scalars in GPRs)
+ getInstrPartialMappingIdxs(MI, MRI, /* isFP */ false, OpRegBankIdx);
+ break;
+ }
// Finally construct the computed mapping.
SmallVector<const ValueMapping *, 8> OpdsMapping(NumOperands);
OpenPOWER on IntegriCloud