diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-07 22:41:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-07 22:41:32 +0000 |
commit | f2af7f44e7612c24e4e264f32d0355da8b9049ca (patch) | |
tree | aaf48b676281582bd0645356551d2b705522542b /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 119421421aa88c3b3cdd0d265dad706429a1376a (diff) | |
download | bcm5719-llvm-f2af7f44e7612c24e4e264f32d0355da8b9049ca.tar.gz bcm5719-llvm-f2af7f44e7612c24e4e264f32d0355da8b9049ca.zip |
lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
(vector of bool).
llvm-svn: 74960
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 260911e3b99..cc672ac22c3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/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) { |