llvm.org GIT mirror llvm / ef134d0
Add a missing check when legalizing a vector extending load. This doesn't solve the root problem, but it corrects the bug in the code I added to support legalizing in the case where the non-extended type is also legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112997 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 10 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
13121312 }
13131313 break;
13141314 case TargetLowering::Expand:
1315 if (!TLI.isLoadExtLegal(ISD::EXTLOAD, SrcVT)) {
1316 // FIXME: If SrcVT isn't legal, then this introduces an illegal
1317 // type.
1315 if (!TLI.isLoadExtLegal(ISD::EXTLOAD, SrcVT) && isTypeLegal(SrcVT)) {
13181316 SDValue Load = DAG.getLoad(SrcVT, dl, Tmp1, Tmp2, LD->getSrcValue(),
13191317 LD->getSrcValueOffset(),
13201318 LD->isVolatile(), LD->isNonTemporal(),
13341332 Tmp2 = LegalizeOp(Load.getValue(1));
13351333 break;
13361334 }
1335 // FIXME: This does not work for vectors on most targets. Sign- and
1336 // zero-extend operations are currently folded into extending loads,
1337 // whether they are legal or not, and then we end up here without any
1338 // support for legalizing them.
13371339 assert(ExtType != ISD::EXTLOAD &&
13381340 "EXTLOAD should always be supported!");
13391341 // Turn the unsupported load into an EXTLOAD followed by an explicit