mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
It seems better to scalarize vectors of size 1 instead of widening them.
Add support to widen SETCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -609,6 +609,7 @@ private:
|
||||
SDValue WidenVecRes_SIGN_EXTEND_INREG(SDNode* N);
|
||||
SDValue WidenVecRes_SELECT(SDNode* N);
|
||||
SDValue WidenVecRes_SELECT_CC(SDNode* N);
|
||||
SDValue WidenVecRes_SETCC(SDNode* N);
|
||||
SDValue WidenVecRes_UNDEF(SDNode *N);
|
||||
SDValue WidenVecRes_VECTOR_SHUFFLE(ShuffleVectorSDNode *N);
|
||||
SDValue WidenVecRes_VSETCC(SDNode* N);
|
||||
|
||||
@@ -1172,6 +1172,7 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
|
||||
case ISD::SIGN_EXTEND_INREG: Res = WidenVecRes_InregOp(N); break;
|
||||
case ISD::SELECT: Res = WidenVecRes_SELECT(N); break;
|
||||
case ISD::SELECT_CC: Res = WidenVecRes_SELECT_CC(N); break;
|
||||
case ISD::SETCC: Res = WidenVecRes_SETCC(N); break;
|
||||
case ISD::UNDEF: Res = WidenVecRes_UNDEF(N); break;
|
||||
case ISD::VECTOR_SHUFFLE:
|
||||
Res = WidenVecRes_VECTOR_SHUFFLE(cast<ShuffleVectorSDNode>(N));
|
||||
@@ -1718,6 +1719,14 @@ SDValue DAGTypeLegalizer::WidenVecRes_SELECT_CC(SDNode *N) {
|
||||
N->getOperand(1), InOp1, InOp2, N->getOperand(4));
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::WidenVecRes_SETCC(SDNode *N) {
|
||||
EVT WidenVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
|
||||
SDValue InOp1 = GetWidenedVector(N->getOperand(0));
|
||||
SDValue InOp2 = GetWidenedVector(N->getOperand(1));
|
||||
return DAG.getNode(ISD::SETCC, N->getDebugLoc(), WidenVT,
|
||||
InOp1, InOp2, N->getOperand(2));
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::WidenVecRes_UNDEF(SDNode *N) {
|
||||
EVT WidenVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
|
||||
return DAG.getUNDEF(WidenVT);
|
||||
|
||||
@@ -682,7 +682,7 @@ void TargetLowering::computeRegisterProperties() {
|
||||
for (unsigned nVT = i+1; nVT <= MVT::LAST_VECTOR_VALUETYPE; ++nVT) {
|
||||
EVT SVT = (MVT::SimpleValueType)nVT;
|
||||
if (isTypeLegal(SVT) && SVT.getVectorElementType() == EltVT &&
|
||||
SVT.getVectorNumElements() > NElts) {
|
||||
SVT.getVectorNumElements() > NElts && NElts != 1) {
|
||||
TransformToType[i] = SVT;
|
||||
ValueTypeActions.setTypeAction(VT, Promote);
|
||||
IsLegalWiderType = true;
|
||||
|
||||
Reference in New Issue
Block a user