[llvm] ae7ce1c - [CodeGen] Remove extraneous ArrayRef (NFC) (#90423)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 16:31:01 PDT 2024


Author: Kazu Hirata
Date: 2024-04-29T16:30:57-07:00
New Revision: ae7ce1c6e728a262049c998c667b79165b285bd8

URL: https://github.com/llvm/llvm-project/commit/ae7ce1c6e728a262049c998c667b79165b285bd8
DIFF: https://github.com/llvm/llvm-project/commit/ae7ce1c6e728a262049c998c667b79165b285bd8.diff

LOG: [CodeGen] Remove extraneous ArrayRef (NFC) (#90423)

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.

Added: 
    

Modified: 
    llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
index f2d5c3c867c2dd..e5f164b182723f 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);
     }
 


        


More information about the llvm-commits mailing list