mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-13 20:25:12 +00:00
Fix the remaining bugs in the vector expansion rework I commited yesterday.
This fixes CodeGen/Generic/vector.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -407,7 +407,7 @@ void SelectionDAGLegalize::HandleOp(SDOperand Op) {
|
|||||||
// Otherwise, this is a multiple element vector that isn't supported.
|
// Otherwise, this is a multiple element vector that isn't supported.
|
||||||
// Split it in half and legalize both parts.
|
// Split it in half and legalize both parts.
|
||||||
SDOperand X, Y;
|
SDOperand X, Y;
|
||||||
ExpandOp(Op, X, Y);
|
SplitVectorOp(Op, X, Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -4006,6 +4006,7 @@ void SelectionDAGLegalize::SplitVectorOp(SDOperand Op, SDOperand &Lo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (Node->getOpcode()) {
|
switch (Node->getOpcode()) {
|
||||||
|
default: assert(0 && "Unknown vector operation!");
|
||||||
case ISD::VConstant: {
|
case ISD::VConstant: {
|
||||||
std::vector<SDOperand> LoOps(Node->op_begin(), Node->op_begin()+NewNumElts);
|
std::vector<SDOperand> LoOps(Node->op_begin(), Node->op_begin()+NewNumElts);
|
||||||
LoOps.push_back(NewNumEltsNode);
|
LoOps.push_back(NewNumEltsNode);
|
||||||
@ -4098,10 +4099,10 @@ SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op,
|
|||||||
PackVectorOp(Node->getOperand(1), NewVT));
|
PackVectorOp(Node->getOperand(1), NewVT));
|
||||||
break;
|
break;
|
||||||
case ISD::VLOAD: {
|
case ISD::VLOAD: {
|
||||||
SDOperand Ch = LegalizeOp(Node->getOperand(2)); // Legalize the chain.
|
SDOperand Ch = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
|
||||||
SDOperand Ptr = LegalizeOp(Node->getOperand(3)); // Legalize the pointer.
|
SDOperand Ptr = LegalizeOp(Node->getOperand(1)); // Legalize the pointer.
|
||||||
|
|
||||||
Result = DAG.getLoad(NewVT, Ch, Ptr, Node->getOperand(4));
|
Result = DAG.getLoad(NewVT, Ch, Ptr, Node->getOperand(2));
|
||||||
|
|
||||||
// Remember that we legalized the chain.
|
// Remember that we legalized the chain.
|
||||||
AddLegalizedOperand(Op.getValue(1), LegalizeOp(Result.getValue(1)));
|
AddLegalizedOperand(Op.getValue(1), LegalizeOp(Result.getValue(1)));
|
||||||
|
Reference in New Issue
Block a user