summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-05-12 23:09:43 +0000
committerNate Begeman <natebegeman@mac.com>2008-05-12 23:09:43 +0000
commitb87e63a7306c51c7895c836b5d2fb7fd89a944d9 (patch)
tree505a1f9e6a79967cac1e702a8d9a4770257043aa /llvm/lib/CodeGen
parentb980f6fb3d6ca420d8f9401371ec14379c54dc79 (diff)
downloadbcm5719-llvm-b87e63a7306c51c7895c836b5d2fb7fd89a944d9.tar.gz
bcm5719-llvm-b87e63a7306c51c7895c836b5d2fb7fd89a944d9.zip
Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next. llvm-svn: 51009
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 1892e8a175b..3abeac4b1fb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -7117,6 +7117,16 @@ SDOperand SelectionDAGLegalize::ScalarizeVectorOp(SDOperand Op) {
ScalarizeVectorOp(Op.getOperand(1)),
ScalarizeVectorOp(Op.getOperand(2)));
break;
+ case ISD::VSETCC: {
+ SDOperand Op0 = ScalarizeVectorOp(Op.getOperand(0));
+ SDOperand Op1 = ScalarizeVectorOp(Op.getOperand(1));
+ Result = DAG.getNode(ISD::SETCC, TLI.getSetCCResultType(Op0), Op0, Op1,
+ Op.getOperand(2));
+ Result = DAG.getNode(ISD::SELECT, NewVT, Result,
+ DAG.getConstant(-1ULL, NewVT),
+ DAG.getConstant(0ULL, NewVT));
+ break;
+ }
}
if (TLI.isTypeLegal(NewVT))
OpenPOWER on IntegriCloud