aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-07 22:41:32 +0000
committerChris Lattner <sabre@nondot.org>2009-07-07 22:41:32 +0000
commit3937b129e61a03fc530011ffae9bbcc00d4cb3fa (patch)
tree8b984ab419f46e18729086bca873022d3afdbf1f /lib/CodeGen
parent75b460578ee242104d7e8483b4ff6e04f5a20894 (diff)
downloadexternal_llvm-3937b129e61a03fc530011ffae9bbcc00d4cb3fa.zip
external_llvm-3937b129e61a03fc530011ffae9bbcc00d4cb3fa.tar.gz
external_llvm-3937b129e61a03fc530011ffae9bbcc00d4cb3fa.tar.bz2
lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
(vector of bool). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 260911e..cc672ac 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -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) {