mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
Add code generator support for VSELECT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49027e639e
commit
b22e35a3c3
@ -4773,6 +4773,11 @@ SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op,
|
||||
assert(0 && "Cast from unsupported vector type not implemented yet!");
|
||||
}
|
||||
}
|
||||
case ISD::VSELECT:
|
||||
Result = DAG.getNode(ISD::SELECT, NewVT, Op.getOperand(0),
|
||||
PackVectorOp(Op.getOperand(1), NewVT),
|
||||
PackVectorOp(Op.getOperand(2), NewVT));
|
||||
break;
|
||||
}
|
||||
|
||||
if (TLI.isTypeLegal(NewVT))
|
||||
|
@ -2760,6 +2760,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
|
||||
case ISD::SETCC: return "setcc";
|
||||
case ISD::SELECT: return "select";
|
||||
case ISD::SELECT_CC: return "select_cc";
|
||||
case ISD::VSELECT: return "vselect";
|
||||
case ISD::INSERT_VECTOR_ELT: return "insert_vector_elt";
|
||||
case ISD::VINSERT_VECTOR_ELT: return "vinsert_vector_elt";
|
||||
case ISD::EXTRACT_VECTOR_ELT: return "extract_vector_elt";
|
||||
|
@ -992,8 +992,14 @@ void SelectionDAGLowering::visitSelect(User &I) {
|
||||
SDOperand Cond = getValue(I.getOperand(0));
|
||||
SDOperand TrueVal = getValue(I.getOperand(1));
|
||||
SDOperand FalseVal = getValue(I.getOperand(2));
|
||||
if (!isa<PackedType>(I.getType())) {
|
||||
setValue(&I, DAG.getNode(ISD::SELECT, TrueVal.getValueType(), Cond,
|
||||
TrueVal, FalseVal));
|
||||
} else {
|
||||
setValue(&I, DAG.getNode(ISD::VSELECT, MVT::Vector, Cond, TrueVal, FalseVal,
|
||||
*(TrueVal.Val->op_end()-2),
|
||||
*(TrueVal.Val->op_end()-1)));
|
||||
}
|
||||
}
|
||||
|
||||
void SelectionDAGLowering::visitCast(User &I) {
|
||||
|
Loading…
Reference in New Issue
Block a user