aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit0d1704b955f9c7ae20e0b3a35b75aaab26e48cfd (patch)
tree378c7d2d68ea037a442e3f49d1ef185a324bf6bc /lib/CodeGen
parent9bfa03c6fd8e02b738e0077fd1af7b18eeeeb4c1 (diff)
downloadexternal_llvm-0d1704b955f9c7ae20e0b3a35b75aaab26e48cfd.tar.gz
external_llvm-0d1704b955f9c7ae20e0b3a35b75aaab26e48cfd.tar.bz2
external_llvm-0d1704b955f9c7ae20e0b3a35b75aaab26e48cfd.zip
Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 1892e8a175..3abeac4b1f 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/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))