lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
authorChris Lattner <sabre@nondot.org>
Tue, 7 Jul 2009 22:41:32 +0000 (22:41 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 Jul 2009 22:41:32 +0000 (22:41 +0000)
(vector of bool).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74960 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

index 260911e3b9940b11e58a51924155ebacdfafb55d..cc672ac22c31735c1097a75a6b21f032adf40225 100644 (file)
@@ -2209,7 +2209,9 @@ void SelectionDAGLowering::visitICmp(User &I) {
   SDValue Op1 = getValue(I.getOperand(0));
   SDValue Op2 = getValue(I.getOperand(1));
   ISD::CondCode Opcode = getICmpCondCode(predicate);
-  setValue(&I, DAG.getSetCC(getCurDebugLoc(),MVT::i1, Op1, Op2, Opcode));
+  
+  MVT DestVT = TLI.getValueType(I.getType());
+  setValue(&I, DAG.getSetCC(getCurDebugLoc(), DestVT, Op1, Op2, Opcode));
 }
 
 void SelectionDAGLowering::visitFCmp(User &I) {
@@ -2221,7 +2223,8 @@ void SelectionDAGLowering::visitFCmp(User &I) {
   SDValue Op1 = getValue(I.getOperand(0));
   SDValue Op2 = getValue(I.getOperand(1));
   ISD::CondCode Condition = getFCmpCondCode(predicate);
-  setValue(&I, DAG.getSetCC(getCurDebugLoc(), MVT::i1, Op1, Op2, Condition));
+  MVT DestVT = TLI.getValueType(I.getType());
+  setValue(&I, DAG.getSetCC(getCurDebugLoc(), DestVT, Op1, Op2, Condition));
 }
 
 void SelectionDAGLowering::visitVICmp(User &I) {