Skip to content

Commit cb5724c

Browse files
committed
[CGP] Remove unnecessary MaybeAlign use (NFC)
Stores now always have an alignment.
1 parent bff94a8 commit cb5724c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7083,13 +7083,13 @@ static bool splitMergedValStore(StoreInst &SI, const DataLayout &DL,
70837083
Value *Addr = Builder.CreateBitCast(
70847084
SI.getOperand(1),
70857085
SplitStoreType->getPointerTo(SI.getPointerAddressSpace()));
7086+
Align Alignment = SI.getAlign();
70867087
const bool IsOffsetStore = (IsLE && Upper) || (!IsLE && !Upper);
7087-
if (IsOffsetStore)
7088+
if (IsOffsetStore) {
70887089
Addr = Builder.CreateGEP(
70897090
SplitStoreType, Addr,
70907091
ConstantInt::get(Type::getInt32Ty(SI.getContext()), 1));
7091-
MaybeAlign Alignment = SI.getAlign();
7092-
if (IsOffsetStore && Alignment) {
7092+
70937093
// When splitting the store in half, naturally one half will retain the
70947094
// alignment of the original wider store, regardless of whether it was
70957095
// over-aligned or not, while the other will require adjustment.

0 commit comments

Comments
 (0)