diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-04-06 23:12:19 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-04-06 23:12:19 +0000 |
| commit | 466841ddc7cc300724c5f480cfacb9401b7eed9c (patch) | |
| tree | a63b8fc8edb120137501d2ddb4eb45d758ca8698 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
| parent | 477169e36a7db3ffc20eacafb3468941f6aabe94 (diff) | |
| download | bcm5719-llvm-466841ddc7cc300724c5f480cfacb9401b7eed9c.tar.gz bcm5719-llvm-466841ddc7cc300724c5f480cfacb9401b7eed9c.zip | |
Make sure to return the result in the right type.
llvm-svn: 27469
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 686f2fa0696..7a92b961ee0 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -962,10 +962,12 @@ SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { assert(CompareOpc>0 && "We only lower altivec predicate compares so far!"); // If this is a non-dot comparison, make the VCMP node. - if (!isDot) - return DAG.getNode(PPCISD::VCMP, Op.getOperand(2).getValueType(), - Op.getOperand(1), Op.getOperand(2), - DAG.getConstant(CompareOpc, MVT::i32)); + if (!isDot) { + SDOperand Tmp = DAG.getNode(PPCISD::VCMP, Op.getOperand(2).getValueType(), + Op.getOperand(1), Op.getOperand(2), + DAG.getConstant(CompareOpc, MVT::i32)); + return DAG.getNode(ISD::BIT_CONVERT, Op.getValueType(), Tmp); + } // Create the PPCISD altivec 'dot' comparison node. std::vector<SDOperand> Ops; |

