From 84a0afdeff7084cb2e966b45c35dfaa3fc13e5a3 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 18 Sep 2015 14:13:18 +0000 Subject: [PATCH] [AArch64] Remove some redundant cases. NFC. llvm-svn: 247988 --- llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 36 ++++++++------------ 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index a41007cab5c1..ee7e6bdeab8e 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -1394,41 +1394,33 @@ bool AArch64InstrInfo::getMemOpBaseRegImmOfsWidth( Scale = 1; break; case AArch64::LDRXui: + case AArch64::LDRDui: case AArch64::STRXui: + case AArch64::STRDui: Scale = Width = 8; break; case AArch64::LDRWui: - case AArch64::STRWui: - Scale = Width = 4; - break; - case AArch64::LDRBui: - case AArch64::STRBui: - Scale = Width = 1; - break; - case AArch64::LDRHui: - case AArch64::STRHui: - Scale = Width = 2; - break; case AArch64::LDRSui: + case AArch64::STRWui: case AArch64::STRSui: Scale = Width = 4; break; - case AArch64::LDRDui: - case AArch64::STRDui: - Scale = Width = 8; + case AArch64::LDRBui: + case AArch64::LDRBBui: + case AArch64::STRBui: + case AArch64::STRBBui: + Scale = Width = 1; + break; + case AArch64::LDRHui: + case AArch64::LDRHHui: + case AArch64::STRHui: + case AArch64::STRHHui: + Scale = Width = 2; break; case AArch64::LDRQui: case AArch64::STRQui: Scale = Width = 16; break; - case AArch64::LDRBBui: - case AArch64::STRBBui: - Scale = Width = 1; - break; - case AArch64::LDRHHui: - case AArch64::STRHHui: - Scale = Width = 2; - break; }; BaseReg = LdSt->getOperand(1).getReg();