mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
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
This commit is contained in:
parent
7d49f2b1bf
commit
ef134d02e0
@ -1313,9 +1313,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
}
|
||||
break;
|
||||
case TargetLowering::Expand:
|
||||
if (!TLI.isLoadExtLegal(ISD::EXTLOAD, SrcVT)) {
|
||||
// FIXME: If SrcVT isn't legal, then this introduces an illegal
|
||||
// type.
|
||||
if (!TLI.isLoadExtLegal(ISD::EXTLOAD, SrcVT) && isTypeLegal(SrcVT)) {
|
||||
SDValue Load = DAG.getLoad(SrcVT, dl, Tmp1, Tmp2, LD->getSrcValue(),
|
||||
LD->getSrcValueOffset(),
|
||||
LD->isVolatile(), LD->isNonTemporal(),
|
||||
@ -1335,6 +1333,10 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
|
||||
Tmp2 = LegalizeOp(Load.getValue(1));
|
||||
break;
|
||||
}
|
||||
// FIXME: This does not work for vectors on most targets. Sign- and
|
||||
// zero-extend operations are currently folded into extending loads,
|
||||
// whether they are legal or not, and then we end up here without any
|
||||
// support for legalizing them.
|
||||
assert(ExtType != ISD::EXTLOAD &&
|
||||
"EXTLOAD should always be supported!");
|
||||
// Turn the unsupported load into an EXTLOAD followed by an explicit
|
||||
|
Loading…
Reference in New Issue
Block a user