Skip to content

Commit 622cf48

Browse files
dakersnarnikic
andauthored
Update InferAlignment.cpp
Co-authored-by: Nikita Popov <[email protected]>
1 parent 1ef4008 commit 622cf48

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Scalar/InferAlignment.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ bool inferAlignment(Function &F, AssumptionCache &AC, DominatorTree &DT) {
6969
// same base pointer.
7070
DenseMap<Value *, Align> BestBasePointerAligns;
7171
auto InferFromBasePointer = [&](Value *PtrOp, Align LoadStoreAlign) {
72-
APInt OffsetFromBase =
73-
APInt(DL.getIndexTypeSizeInBits(PtrOp->getType()), 0);
72+
APInt OffsetFromBase(DL.getIndexTypeSizeInBits(PtrOp->getType()), 0);
7473
PtrOp = PtrOp->stripAndAccumulateConstantOffsets(DL, OffsetFromBase, true);
7574
// Derive the base pointer alignment from the load/store alignment
7675
// and the offset from the base pointer.

0 commit comments

Comments
 (0)