forked from OSchip/llvm-project
Make NaryReassociate pass the address space to isLegalAddressingMode
No test since the kinds of transforms this prevents seem to not really be relevant for SI's different addressing modes. llvm-svn: 239261
This commit is contained in:
parent
e83379e8e4
commit
fb88aca348
|
@ -317,8 +317,10 @@ static bool isGEPFoldable(GetElementPtrInst *GEP,
|
|||
BaseOffset += DL->getStructLayout(STy)->getElementOffset(Field);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned AddrSpace = GEP->getPointerAddressSpace();
|
||||
return TTI->isLegalAddressingMode(GEP->getType()->getElementType(), BaseGV,
|
||||
BaseOffset, HasBaseReg, Scale);
|
||||
BaseOffset, HasBaseReg, Scale, AddrSpace);
|
||||
}
|
||||
|
||||
Instruction *NaryReassociate::tryReassociateGEP(GetElementPtrInst *GEP) {
|
||||
|
|
Loading…
Reference in New Issue