Skip to content

Commit f5151ec

Browse files
committed
Checking for ABI type align is unnecessary
1 parent 2d1cd65 commit f5151ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/IPO/GlobalOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV, const DataLayout &DL) {
584584
// may also have a known alignment, and something might depend on that:
585585
// propagate info to each field.
586586
Align NewAlign = commonAlignment(StartAlignment, OffsetForTy);
587-
NGV->setAlignment(std::max(NewAlign, DL.getABITypeAlign(Ty)));
587+
NGV->setAlignment(NewAlign);
588588

589589
// Copy over the debug info for the variable.
590590
transferSRADebugInfo(GV, NGV, OffsetForTy * 8,

0 commit comments

Comments
 (0)