aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-10-30 18:21:52 +0000
committerMon P Wang <wangmp@apple.com>2008-10-30 18:21:52 +0000
commit42ac14ede1e1d08976ce1ad7d3270e8ab8222f55 (patch)
tree9566948a25db98b3398c16a809142a29b3511add
parent3fb836050c72e6b9cbba5ee1f7a107311f5efa56 (diff)
downloadexternal_llvm-42ac14ede1e1d08976ce1ad7d3270e8ab8222f55.zip
external_llvm-42ac14ede1e1d08976ce1ad7d3270e8ab8222f55.tar.gz
external_llvm-42ac14ede1e1d08976ce1ad7d3270e8ab8222f55.tar.bz2
Add missing vsetcc expansion for widening
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58443 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index f191591..e1a8096 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -7941,9 +7941,20 @@ SDValue SelectionDAGLegalize::WidenVectorOp(SDValue Op, MVT WidenVT) {
break;
}
break;
+ }
+ case ISD::VSETCC: {
+ // Determine widen for the operand
+ SDValue Tmp1 = Node->getOperand(0);
+ MVT TmpVT = Tmp1.getValueType();
+ assert(TmpVT.isVector() && "can not widen non vector type");
+ MVT TmpEVT = TmpVT.getVectorElementType();
+ MVT TmpWidenVT = MVT::getVectorVT(TmpEVT, NewNumElts);
+ Tmp1 = WidenVectorOp(Tmp1, TmpWidenVT);
+ SDValue Tmp2 = WidenVectorOp(Node->getOperand(1), TmpWidenVT);
+ Result = DAG.getNode(Node->getOpcode(), WidenVT, Tmp1, Tmp2,
+ Node->getOperand(2));
break;
}
-
case ISD::ATOMIC_CMP_SWAP_8:
case ISD::ATOMIC_CMP_SWAP_16:
case ISD::ATOMIC_CMP_SWAP_32: