From 91b2a5722cac4d7fe4ab034cf8c2e8aa19e97fcf Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 26 Apr 2024 19:27:06 -0700 Subject: [PATCH] [CodeGen] Remove extraneous ArrayRef (NFC) We don't need to explicitly create an instance of ArrayRef here because getIndexedOffsetInType takes ArrayRef, and ArrayRef can be implicitly constructed from a C array. --- llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp index f2d5c3c867c2d..e5f164b182723 100644 --- a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp +++ b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp @@ -890,7 +890,7 @@ struct VectorInfo { ConstantInt::get(Type::getInt32Ty(LI->getContext()), 0), ConstantInt::get(Type::getInt32Ty(LI->getContext()), i), }; - int64_t Ofs = DL.getIndexedOffsetInType(Result.VTy, ArrayRef(Idx, 2)); + int64_t Ofs = DL.getIndexedOffsetInType(Result.VTy, Idx); Result.EI[i] = ElementInfo(Offset + Ofs, i == 0 ? LI : nullptr); }