Skip to content

Commit 5687acf

Browse files
committed
[MemCpyOpt] Simplify find*Alignment
1 parent c6bdd8e commit 5687acf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,12 @@ bool MemsetRange::isProfitableToUseMemset(const DataLayout &DL) const {
146146

147147

148148
static Align findStoreAlignment(const DataLayout &DL, const StoreInst *SI) {
149-
return DL.getValueOrABITypeAlignment(MaybeAlign(SI->getAlignment()),
149+
return DL.getValueOrABITypeAlignment(SI->getAlign(),
150150
SI->getOperand(0)->getType());
151151
}
152152

153153
static Align findLoadAlignment(const DataLayout &DL, const LoadInst *LI) {
154-
return DL.getValueOrABITypeAlignment(MaybeAlign(LI->getAlignment()),
155-
LI->getType());
154+
return DL.getValueOrABITypeAlignment(LI->getAlign(), LI->getType());
156155
}
157156

158157
static Align findCommonAlignment(const DataLayout &DL, const StoreInst *SI,

0 commit comments

Comments
 (0)