From 89f7a48a4aea201199927659b8c513f7c8918f6b Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Fri, 16 Sep 2016 12:33:34 +0000 Subject: [PATCH] [AArch64][GlobalISel] Use the generic DefaultMapping as the default. This lets generic logic handle the common case, instead of having to implement applyMappingImpl for each instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281720 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64RegisterBankInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Target/AArch64/AArch64RegisterBankInfo.cpp b/lib/Target/AArch64/AArch64RegisterBankInfo.cpp index d0da232bdce..12fdb0d9cc6 100644 --- a/lib/Target/AArch64/AArch64RegisterBankInfo.cpp +++ b/lib/Target/AArch64/AArch64RegisterBankInfo.cpp @@ -157,7 +157,6 @@ AArch64RegisterBankInfo::getInstrAlternativeMappings( void AArch64RegisterBankInfo::applyMappingImpl( const OperandsMapper &OpdMapper) const { switch (OpdMapper.getMI().getOpcode()) { - case TargetOpcode::G_ADD: case TargetOpcode::G_OR: { // Those ID must match getInstrAlternativeMappings. assert((OpdMapper.getInstrMapping().getID() == 1 || @@ -187,7 +186,7 @@ AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const { else BankID = AArch64::GPRRegBankID; - Mapping = InstructionMapping{1, 1, MI.getNumOperands()}; + Mapping = InstructionMapping{DefaultMappingID, 1, MI.getNumOperands()}; int Size = Ty.isValid() ? Ty.getSizeInBits() : 0; for (unsigned Idx = 0; Idx < MI.getNumOperands(); ++Idx) Mapping.setOperandMapping(Idx, Size, getRegBank(BankID));