mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Move value type list from TargetRegisterClass to TargetRegisterInfo
Differential Revision: https://reviews.llvm.org/D31937 llvm-svn: 301231
This commit is contained in:
parent
b7fb34ab2b
commit
334675baa0
@ -2274,7 +2274,8 @@ protected:
|
||||
|
||||
/// Return true if the value types that can be represented by the specified
|
||||
/// register class are all legal.
|
||||
bool isLegalRC(const TargetRegisterClass *RC) const;
|
||||
bool isLegalRC(const TargetRegisterInfo &TRI,
|
||||
const TargetRegisterClass &RC) const;
|
||||
|
||||
/// Replace/modify any TargetFrameIndex operands with a targte-dependent
|
||||
/// sequence of memory operands that is recognized by PrologEpilogInserter.
|
||||
|
@ -40,13 +40,12 @@ class TargetRegisterClass {
|
||||
public:
|
||||
typedef const MCPhysReg* iterator;
|
||||
typedef const MCPhysReg* const_iterator;
|
||||
typedef const MVT::SimpleValueType* vt_iterator;
|
||||
typedef const TargetRegisterClass* const * sc_iterator;
|
||||
|
||||
// Instance variables filled by tablegen, do not use!
|
||||
const MCRegisterClass *MC;
|
||||
const uint16_t SpillSize, SpillAlignment;
|
||||
const vt_iterator VTs;
|
||||
const MVT::SimpleValueType *VTs;
|
||||
const uint32_t *SubClassMask;
|
||||
const uint16_t *SuperRegIndices;
|
||||
const LaneBitmask LaneMask;
|
||||
@ -102,26 +101,6 @@ public:
|
||||
/// registers.
|
||||
bool isAllocatable() const { return MC->isAllocatable(); }
|
||||
|
||||
/// Return true if this TargetRegisterClass has the ValueType vt.
|
||||
bool hasType(MVT vt) const {
|
||||
for(int i = 0; VTs[i] != MVT::Other; ++i)
|
||||
if (MVT(VTs[i]) == vt)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// vt_begin / vt_end - Loop over all of the value types that can be
|
||||
/// represented by values in this register class.
|
||||
vt_iterator vt_begin() const {
|
||||
return VTs;
|
||||
}
|
||||
|
||||
vt_iterator vt_end() const {
|
||||
vt_iterator I = VTs;
|
||||
while (*I != MVT::Other) ++I;
|
||||
return I;
|
||||
}
|
||||
|
||||
/// Return true if the specified TargetRegisterClass
|
||||
/// is a proper sub-class of this TargetRegisterClass.
|
||||
bool hasSubClass(const TargetRegisterClass *RC) const {
|
||||
@ -239,6 +218,7 @@ struct RegClassWeight {
|
||||
class TargetRegisterInfo : public MCRegisterInfo {
|
||||
public:
|
||||
typedef const TargetRegisterClass * const * regclass_iterator;
|
||||
typedef const MVT::SimpleValueType* vt_iterator;
|
||||
private:
|
||||
const TargetRegisterInfoDesc *InfoDesc; // Extra desc array for codegen
|
||||
const char *const *SubRegIndexNames; // Names of subreg indexes.
|
||||
@ -337,6 +317,27 @@ public:
|
||||
return RC.SpillAlignment;
|
||||
}
|
||||
|
||||
/// Return true if the given TargetRegisterClass has the ValueType T.
|
||||
bool hasType(const TargetRegisterClass &RC, MVT T) const {
|
||||
for (int i = 0; RC.VTs[i] != MVT::Other; ++i)
|
||||
if (MVT(RC.VTs[i]) == T)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Loop over all of the value types that can be represented by values
|
||||
// in the given register class.
|
||||
vt_iterator valuetypes_begin(const TargetRegisterClass &RC) const {
|
||||
return RC.VTs;
|
||||
}
|
||||
|
||||
vt_iterator valuetypes_end(const TargetRegisterClass &RC) const {
|
||||
vt_iterator I = RC.VTs;
|
||||
while (*I != MVT::Other)
|
||||
++I;
|
||||
return I;
|
||||
}
|
||||
|
||||
/// Returns the Register Class of a physical register of the given type,
|
||||
/// picking the most sub register class of the right type that contains this
|
||||
/// physreg.
|
||||
|
@ -161,7 +161,8 @@ EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone, bool IsCloned,
|
||||
if (VRBase) {
|
||||
DstRC = MRI->getRegClass(VRBase);
|
||||
} else if (UseRC) {
|
||||
assert(UseRC->hasType(VT) && "Incompatible phys register def and uses!");
|
||||
assert(TRI->hasType(*UseRC, VT) &&
|
||||
"Incompatible phys register def and uses!");
|
||||
DstRC = UseRC;
|
||||
} else {
|
||||
DstRC = TLI->getRegClassFor(VT);
|
||||
|
@ -6653,12 +6653,12 @@ static void GetRegistersForValue(SelectionDAG &DAG, const TargetLowering &TLI,
|
||||
|
||||
MachineFunction &MF = DAG.getMachineFunction();
|
||||
SmallVector<unsigned, 4> Regs;
|
||||
const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
|
||||
|
||||
// If this is a constraint for a single physreg, or a constraint for a
|
||||
// register class, find it.
|
||||
std::pair<unsigned, const TargetRegisterClass *> PhysReg =
|
||||
TLI.getRegForInlineAsmConstraint(MF.getSubtarget().getRegisterInfo(),
|
||||
OpInfo.ConstraintCode,
|
||||
TLI.getRegForInlineAsmConstraint(&TRI, OpInfo.ConstraintCode,
|
||||
OpInfo.ConstraintVT);
|
||||
|
||||
unsigned NumRegs = 1;
|
||||
@ -6667,11 +6667,11 @@ static void GetRegistersForValue(SelectionDAG &DAG, const TargetLowering &TLI,
|
||||
// cast of the input value. More generally, handle any case where the input
|
||||
// value disagrees with the register class we plan to stick this in.
|
||||
if (OpInfo.Type == InlineAsm::isInput &&
|
||||
PhysReg.second && !PhysReg.second->hasType(OpInfo.ConstraintVT)) {
|
||||
PhysReg.second && !TRI.hasType(*PhysReg.second, OpInfo.ConstraintVT)) {
|
||||
// Try to convert to the first EVT that the reg class contains. If the
|
||||
// types are identical size, use a bitcast to convert (e.g. two differing
|
||||
// vector types).
|
||||
MVT RegVT = *PhysReg.second->vt_begin();
|
||||
MVT RegVT = *TRI.valuetypes_begin(*PhysReg.second);
|
||||
if (RegVT.getSizeInBits() == OpInfo.CallOperand.getValueSizeInBits()) {
|
||||
OpInfo.CallOperand = DAG.getNode(ISD::BITCAST, DL,
|
||||
RegVT, OpInfo.CallOperand);
|
||||
@ -6699,12 +6699,12 @@ static void GetRegistersForValue(SelectionDAG &DAG, const TargetLowering &TLI,
|
||||
if (unsigned AssignedReg = PhysReg.first) {
|
||||
const TargetRegisterClass *RC = PhysReg.second;
|
||||
if (OpInfo.ConstraintVT == MVT::Other)
|
||||
ValueVT = *RC->vt_begin();
|
||||
ValueVT = *TRI.valuetypes_begin(*RC);
|
||||
|
||||
// Get the actual register value type. This is important, because the user
|
||||
// may have asked for (e.g.) the AX register in i32 type. We need to
|
||||
// remember that AX is actually i16 to get the right extension.
|
||||
RegVT = *RC->vt_begin();
|
||||
RegVT = *TRI.valuetypes_begin(*RC);
|
||||
|
||||
// This is a explicit reference to a physical register.
|
||||
Regs.push_back(AssignedReg);
|
||||
@ -6730,7 +6730,7 @@ static void GetRegistersForValue(SelectionDAG &DAG, const TargetLowering &TLI,
|
||||
// Otherwise, if this was a reference to an LLVM register class, create vregs
|
||||
// for this reference.
|
||||
if (const TargetRegisterClass *RC = PhysReg.second) {
|
||||
RegVT = *RC->vt_begin();
|
||||
RegVT = *TRI.valuetypes_begin(*RC);
|
||||
if (OpInfo.ConstraintVT == MVT::Other)
|
||||
ValueVT = RegVT;
|
||||
|
||||
|
@ -2541,7 +2541,7 @@ TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *RI,
|
||||
for (const TargetRegisterClass *RC : RI->regclasses()) {
|
||||
// If none of the value types for this register class are valid, we
|
||||
// can't use it. For example, 64-bit reg classes on 32-bit targets.
|
||||
if (!isLegalRC(RC))
|
||||
if (!isLegalRC(*RI, *RC))
|
||||
continue;
|
||||
|
||||
for (TargetRegisterClass::iterator I = RC->begin(), E = RC->end();
|
||||
@ -2553,9 +2553,9 @@ TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *RI,
|
||||
// If this register class has the requested value type, return it,
|
||||
// otherwise keep searching and return the first class found
|
||||
// if no other is found which explicitly has the requested type.
|
||||
if (RC->hasType(VT))
|
||||
if (RI->hasType(*RC, VT))
|
||||
return S;
|
||||
else if (!R.second)
|
||||
if (!R.second)
|
||||
R = S;
|
||||
}
|
||||
}
|
||||
|
@ -1184,12 +1184,11 @@ static unsigned getVectorTypeBreakdownMVT(MVT VT, MVT &IntermediateVT,
|
||||
|
||||
/// isLegalRC - Return true if the value types that can be represented by the
|
||||
/// specified register class are all legal.
|
||||
bool TargetLoweringBase::isLegalRC(const TargetRegisterClass *RC) const {
|
||||
for (TargetRegisterClass::vt_iterator I = RC->vt_begin(), E = RC->vt_end();
|
||||
I != E; ++I) {
|
||||
bool TargetLoweringBase::isLegalRC(const TargetRegisterInfo &TRI,
|
||||
const TargetRegisterClass &RC) const {
|
||||
for (auto I = TRI.valuetypes_begin(RC); *I != MVT::Other; ++I)
|
||||
if (isTypeLegal(*I))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1301,7 +1300,7 @@ TargetLoweringBase::findRepresentativeClass(const TargetRegisterInfo *TRI,
|
||||
// We want the largest possible spill size.
|
||||
if (TRI->getSpillSize(*SuperRC) <= TRI->getSpillSize(*BestRC))
|
||||
continue;
|
||||
if (!isLegalRC(SuperRC))
|
||||
if (!isLegalRC(*TRI, *SuperRC))
|
||||
continue;
|
||||
BestRC = SuperRC;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ TargetRegisterInfo::getMinimalPhysRegClass(unsigned reg, MVT VT) const {
|
||||
// this physreg.
|
||||
const TargetRegisterClass* BestRC = nullptr;
|
||||
for (const TargetRegisterClass* RC : regclasses()) {
|
||||
if ((VT == MVT::Other || RC->hasType(VT)) && RC->contains(reg) &&
|
||||
if ((VT == MVT::Other || hasType(*RC, VT)) && RC->contains(reg) &&
|
||||
(!BestRC || BestRC->hasSubClass(RC)))
|
||||
BestRC = RC;
|
||||
}
|
||||
@ -207,7 +207,7 @@ const TargetRegisterClass *firstCommonClass(const uint32_t *A,
|
||||
if (unsigned Common = *A++ & *B++) {
|
||||
const TargetRegisterClass *RC =
|
||||
TRI->getRegClass(I + countTrailingZeros(Common));
|
||||
if (SVT == MVT::SimpleValueType::Any || RC->hasType(VT))
|
||||
if (SVT == MVT::SimpleValueType::Any || TRI->hasType(*RC, VT))
|
||||
return RC;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -142,9 +142,9 @@ void AVRInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MFI.getObjectAlignment(FrameIndex));
|
||||
|
||||
unsigned Opcode = 0;
|
||||
if (RC->hasType(MVT::i8)) {
|
||||
if (TRI->hasType(*RC, MVT::i8)) {
|
||||
Opcode = AVR::STDPtrQRr;
|
||||
} else if (RC->hasType(MVT::i16)) {
|
||||
} else if (TRI->hasType(*RC, MVT::i16)) {
|
||||
Opcode = AVR::STDWPtrQRr;
|
||||
} else {
|
||||
llvm_unreachable("Cannot store this register into a stack slot!");
|
||||
@ -176,9 +176,9 @@ void AVRInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
MFI.getObjectAlignment(FrameIndex));
|
||||
|
||||
unsigned Opcode = 0;
|
||||
if (RC->hasType(MVT::i8)) {
|
||||
if (TRI->hasType(*RC, MVT::i8)) {
|
||||
Opcode = AVR::LDDRdPtrQ;
|
||||
} else if (RC->hasType(MVT::i16)) {
|
||||
} else if (TRI->hasType(*RC, MVT::i16)) {
|
||||
// Opcode = AVR::LDDWRdPtrQ;
|
||||
//:FIXME: remove this once PR13375 gets fixed
|
||||
Opcode = AVR::LDDWRdYQ;
|
||||
|
@ -78,11 +78,12 @@ BitVector AVRRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
const TargetRegisterClass *
|
||||
AVRRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
|
||||
const MachineFunction &MF) const {
|
||||
if (RC->hasType(MVT::i16)) {
|
||||
const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
|
||||
if (TRI->hasType(*RC, MVT::i16)) {
|
||||
return &AVR::DREGSRegClass;
|
||||
}
|
||||
|
||||
if (RC->hasType(MVT::i8)) {
|
||||
if (TRI->hasType(*RC, MVT::i8)) {
|
||||
return &AVR::GPR8RegClass;
|
||||
}
|
||||
|
||||
|
@ -116,9 +116,10 @@ static MachineOperand *getCallTargetRegOpnd(MachineInstr &MI) {
|
||||
|
||||
/// Return type of register Reg.
|
||||
static MVT::SimpleValueType getRegTy(unsigned Reg, MachineFunction &MF) {
|
||||
const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
|
||||
const TargetRegisterClass *RC = MF.getRegInfo().getRegClass(Reg);
|
||||
assert(RC->vt_end() - RC->vt_begin() == 1);
|
||||
return *RC->vt_begin();
|
||||
assert(TRI.valuetypes_end(*RC) - TRI.valuetypes_begin(*RC) == 1);
|
||||
return *TRI.valuetypes_begin(*RC);
|
||||
}
|
||||
|
||||
/// Do the following transformation:
|
||||
|
@ -207,13 +207,13 @@ storeRegToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
Opc = Mips::SDC1;
|
||||
else if (Mips::FGR64RegClass.hasSubClassEq(RC))
|
||||
Opc = Mips::SDC164;
|
||||
else if (RC->hasType(MVT::v16i8))
|
||||
else if (TRI->hasType(*RC, MVT::v16i8))
|
||||
Opc = Mips::ST_B;
|
||||
else if (RC->hasType(MVT::v8i16) || RC->hasType(MVT::v8f16))
|
||||
else if (TRI->hasType(*RC, MVT::v8i16) || TRI->hasType(*RC, MVT::v8f16))
|
||||
Opc = Mips::ST_H;
|
||||
else if (RC->hasType(MVT::v4i32) || RC->hasType(MVT::v4f32))
|
||||
else if (TRI->hasType(*RC, MVT::v4i32) || TRI->hasType(*RC, MVT::v4f32))
|
||||
Opc = Mips::ST_W;
|
||||
else if (RC->hasType(MVT::v2i64) || RC->hasType(MVT::v2f64))
|
||||
else if (TRI->hasType(*RC, MVT::v2i64) || TRI->hasType(*RC, MVT::v2f64))
|
||||
Opc = Mips::ST_D;
|
||||
else if (Mips::LO32RegClass.hasSubClassEq(RC))
|
||||
Opc = Mips::SW;
|
||||
@ -280,13 +280,13 @@ loadRegFromStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
Opc = Mips::LDC1;
|
||||
else if (Mips::FGR64RegClass.hasSubClassEq(RC))
|
||||
Opc = Mips::LDC164;
|
||||
else if (RC->hasType(MVT::v16i8))
|
||||
else if (TRI->hasType(*RC, MVT::v16i8))
|
||||
Opc = Mips::LD_B;
|
||||
else if (RC->hasType(MVT::v8i16) || RC->hasType(MVT::v8f16))
|
||||
else if (TRI->hasType(*RC, MVT::v8i16) || TRI->hasType(*RC, MVT::v8f16))
|
||||
Opc = Mips::LD_H;
|
||||
else if (RC->hasType(MVT::v4i32) || RC->hasType(MVT::v4f32))
|
||||
else if (TRI->hasType(*RC, MVT::v4i32) || TRI->hasType(*RC, MVT::v4f32))
|
||||
Opc = Mips::LD_W;
|
||||
else if (RC->hasType(MVT::v2i64) || RC->hasType(MVT::v2f64))
|
||||
else if (TRI->hasType(*RC, MVT::v2i64) || TRI->hasType(*RC, MVT::v2f64))
|
||||
Opc = Mips::LD_D;
|
||||
else if (Mips::HI32RegClass.hasSubClassEq(RC))
|
||||
Opc = Mips::LW;
|
||||
|
@ -9057,6 +9057,7 @@ PPCTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
MachineBasicBlock *MBB) const {
|
||||
DebugLoc DL = MI.getDebugLoc();
|
||||
const TargetInstrInfo *TII = Subtarget.getInstrInfo();
|
||||
const PPCRegisterInfo *TRI = Subtarget.getRegisterInfo();
|
||||
|
||||
MachineFunction *MF = MBB->getParent();
|
||||
MachineRegisterInfo &MRI = MF->getRegInfo();
|
||||
@ -9070,7 +9071,7 @@ PPCTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
|
||||
unsigned DstReg = MI.getOperand(0).getReg();
|
||||
const TargetRegisterClass *RC = MRI.getRegClass(DstReg);
|
||||
assert(RC->hasType(MVT::i32) && "Invalid destination!");
|
||||
assert(TRI->hasType(*RC, MVT::i32) && "Invalid destination!");
|
||||
unsigned mainDstReg = MRI.createVirtualRegister(RC);
|
||||
unsigned restoreDstReg = MRI.createVirtualRegister(RC);
|
||||
|
||||
@ -9153,7 +9154,6 @@ PPCTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
|
||||
// Setup
|
||||
MIB = BuildMI(*thisMBB, MI, DL, TII->get(PPC::BCLalways)).addMBB(mainMBB);
|
||||
const PPCRegisterInfo *TRI = Subtarget.getRegisterInfo();
|
||||
MIB.addRegMask(TRI->getNoPreservedMask());
|
||||
|
||||
BuildMI(*thisMBB, MI, DL, TII->get(PPC::LI), restoreDstReg).addImm(1);
|
||||
|
@ -3234,6 +3234,7 @@ SparcTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
MachineBasicBlock *MBB) const {
|
||||
DebugLoc DL = MI.getDebugLoc();
|
||||
const TargetInstrInfo *TII = Subtarget->getInstrInfo();
|
||||
const TargetRegisterInfo *TRI = Subtarget->getRegisterInfo();
|
||||
|
||||
MachineFunction *MF = MBB->getParent();
|
||||
MachineRegisterInfo &MRI = MF->getRegInfo();
|
||||
@ -3245,7 +3246,8 @@ SparcTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
|
||||
unsigned DstReg = MI.getOperand(0).getReg();
|
||||
const TargetRegisterClass *RC = MRI.getRegClass(DstReg);
|
||||
assert(RC->hasType(MVT::i32) && "Invalid destination!");
|
||||
assert(TRI->hasType(*RC, MVT::i32) && "Invalid destination!");
|
||||
(void)TRI;
|
||||
unsigned mainDstReg = MRI.createVirtualRegister(RC);
|
||||
unsigned restoreDstReg = MRI.createVirtualRegister(RC);
|
||||
|
||||
|
@ -45,10 +45,11 @@ using namespace llvm;
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
MVT WebAssemblyAsmPrinter::getRegType(unsigned RegNo) const {
|
||||
const TargetRegisterInfo *TRI = Subtarget->getRegisterInfo();
|
||||
const TargetRegisterClass *TRC = MRI->getRegClass(RegNo);
|
||||
for (MVT T : {MVT::i32, MVT::i64, MVT::f32, MVT::f64, MVT::v16i8, MVT::v8i16,
|
||||
MVT::v4i32, MVT::v4f32})
|
||||
if (TRC->hasType(T))
|
||||
if (TRI->hasType(*TRC, T))
|
||||
return T;
|
||||
DEBUG(errs() << "Unknown type for register number: " << RegNo);
|
||||
llvm_unreachable("Unknown register type");
|
||||
|
@ -25944,6 +25944,7 @@ X86TargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
DebugLoc DL = MI.getDebugLoc();
|
||||
MachineFunction *MF = MBB->getParent();
|
||||
const TargetInstrInfo *TII = Subtarget.getInstrInfo();
|
||||
const TargetRegisterInfo *TRI = Subtarget.getRegisterInfo();
|
||||
MachineRegisterInfo &MRI = MF->getRegInfo();
|
||||
|
||||
const BasicBlock *BB = MBB->getBasicBlock();
|
||||
@ -25960,7 +25961,8 @@ X86TargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
|
||||
|
||||
DstReg = MI.getOperand(CurOp++).getReg();
|
||||
const TargetRegisterClass *RC = MRI.getRegClass(DstReg);
|
||||
assert(RC->hasType(MVT::i32) && "Invalid destination!");
|
||||
assert(TRI->hasType(*RC, MVT::i32) && "Invalid destination!");
|
||||
(void)TRI;
|
||||
unsigned mainDstReg = MRI.createVirtualRegister(RC);
|
||||
unsigned restoreDstReg = MRI.createVirtualRegister(RC);
|
||||
|
||||
@ -35937,7 +35939,7 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
||||
// type. For example, we want to map "{ax},i32" -> {eax}, we don't want it to
|
||||
// turn into {ax},{dx}.
|
||||
// MVT::Other is used to specify clobber names.
|
||||
if (Res.second->hasType(VT) || VT == MVT::Other)
|
||||
if (TRI->hasType(*Res.second, VT) || VT == MVT::Other)
|
||||
return Res; // Correct type already, nothing to do.
|
||||
|
||||
// Get a matching integer of the correct size. i.e. "ax" with MVT::32 should
|
||||
@ -35975,11 +35977,11 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
||||
Res.second = &X86::FR32RegClass;
|
||||
else if (VT == MVT::f64 || VT == MVT::i64)
|
||||
Res.second = &X86::FR64RegClass;
|
||||
else if (X86::VR128RegClass.hasType(VT))
|
||||
else if (TRI->hasType(X86::VR128RegClass, VT))
|
||||
Res.second = &X86::VR128RegClass;
|
||||
else if (X86::VR256RegClass.hasType(VT))
|
||||
else if (TRI->hasType(X86::VR256RegClass, VT))
|
||||
Res.second = &X86::VR256RegClass;
|
||||
else if (X86::VR512RegClass.hasType(VT))
|
||||
else if (TRI->hasType(X86::VR512RegClass, VT))
|
||||
Res.second = &X86::VR512RegClass;
|
||||
else {
|
||||
// Type mismatch and not a clobber: Return an error;
|
||||
|
@ -8747,7 +8747,7 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,
|
||||
// Emit the load instruction.
|
||||
SDNode *Load = nullptr;
|
||||
if (FoldedLoad) {
|
||||
EVT VT = *RC->vt_begin();
|
||||
EVT VT = *TRI.valuetypes_begin(*RC);
|
||||
std::pair<MachineInstr::mmo_iterator,
|
||||
MachineInstr::mmo_iterator> MMOs =
|
||||
MF.extractLoadMemRefs(cast<MachineSDNode>(N)->memoperands_begin(),
|
||||
@ -8775,7 +8775,7 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,
|
||||
const TargetRegisterClass *DstRC = nullptr;
|
||||
if (MCID.getNumDefs() > 0) {
|
||||
DstRC = getRegClass(MCID, 0, &RI, MF);
|
||||
VTs.push_back(*DstRC->vt_begin());
|
||||
VTs.push_back(*TRI.valuetypes_begin(*DstRC));
|
||||
}
|
||||
for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {
|
||||
EVT VT = N->getValueType(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user