forked from OSchip/llvm-project
Skip checking preferred alignment of GVs defined in other translation units all together.
llvm-svn: 100133
This commit is contained in:
parent
d9929f03cf
commit
8563ee4ed4
|
@ -6152,7 +6152,7 @@ unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const {
|
|||
unsigned Align = GV->getAlignment();
|
||||
if (!Align) {
|
||||
if (GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) {
|
||||
if (GV->getType()->getElementType()->isSized()) {
|
||||
if (GVar->hasInitializer()) {
|
||||
const TargetData *TD = TLI.getTargetData();
|
||||
Align = TD->getPreferredAlignment(GVar);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue