diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -279,8 +279,7 @@ Idx = Builder.CreateTrunc(Idx, IntPtrTy); unsigned ElementSize = - DL.getTypeAllocSize(Init->getType()->getArrayElementType()); - + DL.getTypeAllocSize(Init->getType()->getArrayElementType()); // If inbounds keyword is not present, Idx * ElementSize can overflow. // Let's assume that ElementSize is 2 and the wanted value is at offset 0.