forked from OSchip/llvm-project
GlobalISel: Remove unnecessary check for copy type
COPY isn't allowed to change the type, but can mix no type with type.
This commit is contained in:
parent
66ffa0e91f
commit
924f31bc3c
|
@ -151,9 +151,8 @@ const ConstantFP* getConstantFPVRegVal(Register VReg,
|
|||
MachineInstr *getOpcodeDef(unsigned Opcode, Register Reg,
|
||||
const MachineRegisterInfo &MRI);
|
||||
|
||||
/// Find the def instruction for \p Reg, folding away any trivial copies. Note
|
||||
/// it may still return a COPY, if it changes the type. May return nullptr if \p
|
||||
/// Reg is not a generic virtual register.
|
||||
/// Find the def instruction for \p Reg, folding away any trivial copies. May
|
||||
/// return nullptr if \p Reg is not a generic virtual register.
|
||||
MachineInstr *getDefIgnoringCopies(Register Reg,
|
||||
const MachineRegisterInfo &MRI);
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ getDefSrcRegIgnoringCopies(Register Reg, const MachineRegisterInfo &MRI) {
|
|||
while (DefMI->getOpcode() == TargetOpcode::COPY) {
|
||||
Register SrcReg = DefMI->getOperand(1).getReg();
|
||||
auto SrcTy = MRI.getType(SrcReg);
|
||||
if (!SrcTy.isValid() || SrcTy != DstTy)
|
||||
if (!SrcTy.isValid())
|
||||
break;
|
||||
DefMI = MRI.getVRegDef(SrcReg);
|
||||
DefSrcReg = SrcReg;
|
||||
|
|
Loading…
Reference in New Issue