From 1ea182ce79eedae740e20bbb33bdb3c4c4eb53cb Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 31 Jul 2020 10:19:02 -0400 Subject: [PATCH] GlobalISel: Simplify code This cannot be a vector of pointers, so using getScalarSizeInBits just added a bit extra noise. --- llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index e7f105f..d4ee08e 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp @@ -3515,7 +3515,8 @@ LegalizerHelper::reduceLoadStoreWidth(MachineInstr &MI, unsigned TypeIdx, if (NumParts == -1) return UnableToLegalize; - const LLT OffsetTy = LLT::scalar(MRI.getType(AddrReg).getScalarSizeInBits()); + LLT PtrTy = MRI.getType(AddrReg); + const LLT OffsetTy = LLT::scalar(PtrTy.getSizeInBits()); unsigned TotalSize = ValTy.getSizeInBits(); -- 2.7.4