From e576cd1a931033bbb58888b85d3dbbae76199f4e Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Tue, 9 Jul 2019 02:48:30 +0000 Subject: [PATCH] [PowerPC][NFC] remove redundant function isVFReg(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365429 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCInstrInfo.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index 2658a85303f..126921c989b 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -2777,10 +2777,6 @@ bool PPCInstrInfo::convertToImmediateForm(MachineInstr &MI, return false; } -static bool isVFReg(unsigned Reg) { - return PPC::VFRCRegClass.contains(Reg); -} - bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, ImmInstrInfo &III, bool PostRA) const { unsigned Opc = MI.getOpcode(); @@ -3115,7 +3111,7 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, break; case PPC::LXSSPX: if (PostRA) { - if (isVFReg(MI.getOperand(0).getReg())) + if (isVFRegister(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::LXSSP; else { III.ImmOpcode = PPC::LFS; @@ -3129,7 +3125,7 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, break; case PPC::LXSDX: if (PostRA) { - if (isVFReg(MI.getOperand(0).getReg())) + if (isVFRegister(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::LXSD; else { III.ImmOpcode = PPC::LFD; @@ -3147,7 +3143,7 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, break; case PPC::STXSSPX: if (PostRA) { - if (isVFReg(MI.getOperand(0).getReg())) + if (isVFRegister(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::STXSSP; else { III.ImmOpcode = PPC::STFS; @@ -3161,7 +3157,7 @@ bool PPCInstrInfo::instrHasImmForm(const MachineInstr &MI, break; case PPC::STXSDX: if (PostRA) { - if (isVFReg(MI.getOperand(0).getReg())) + if (isVFRegister(MI.getOperand(0).getReg())) III.ImmOpcode = PPC::STXSD; else { III.ImmOpcode = PPC::STFD; -- 2.40.0