mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Fix PR3011: LegalizeTypes support for scalarizing
SELECT_CC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,6 +48,7 @@ void DAGTypeLegalizer::ScalarizeVectorResult(SDNode *N, unsigned ResNo) {
|
||||
case ISD::INSERT_VECTOR_ELT: R = ScalarizeVecRes_INSERT_VECTOR_ELT(N); break;
|
||||
case ISD::LOAD: R = ScalarizeVecRes_LOAD(cast<LoadSDNode>(N));break;
|
||||
case ISD::SELECT: R = ScalarizeVecRes_SELECT(N); break;
|
||||
case ISD::SELECT_CC: R = ScalarizeVecRes_SELECT_CC(N); break;
|
||||
case ISD::UNDEF: R = ScalarizeVecRes_UNDEF(N); break;
|
||||
case ISD::VECTOR_SHUFFLE: R = ScalarizeVecRes_VECTOR_SHUFFLE(N); break;
|
||||
case ISD::VSETCC: R = ScalarizeVecRes_VSETCC(N); break;
|
||||
@@ -162,6 +163,14 @@ SDValue DAGTypeLegalizer::ScalarizeVecRes_SELECT(SDNode *N) {
|
||||
GetScalarizedVector(N->getOperand(2)));
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::ScalarizeVecRes_SELECT_CC(SDNode *N) {
|
||||
SDValue LHS = GetScalarizedVector(N->getOperand(2));
|
||||
return DAG.getNode(ISD::SELECT_CC, LHS.getValueType(),
|
||||
N->getOperand(0), N->getOperand(1),
|
||||
LHS, GetScalarizedVector(N->getOperand(3)),
|
||||
N->getOperand(4));
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::ScalarizeVecRes_VECTOR_SHUFFLE(SDNode *N) {
|
||||
// Figure out if the scalar is the LHS or RHS and return it.
|
||||
SDValue Arg = N->getOperand(2).getOperand(0);
|
||||
|
Reference in New Issue
Block a user