Handle void in XCoreTargetLowering::isLegalAddressingMode. Triggers in

test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2009-07-17 07:16:38 +00:00
parent e91bf2c993
commit ed224949ed

View File

@ -1125,6 +1125,11 @@ static inline bool isImmUs4(int64_t val)
bool
XCoreTargetLowering::isLegalAddressingMode(const AddrMode &AM,
const Type *Ty) const {
// Be conservative with void
// FIXME: Can we be more aggressive?
if (Ty->getTypeID() == Type::VoidTyID)
return false;
const TargetData *TD = TM.getTargetData();
unsigned Size = TD->getTypeAllocSize(Ty);
if (AM.BaseGV) {