aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CellSPU/SPUISelLowering.cpp
diff options
context:
space:
mode:
authorScott Michel <scottm@aero.org>2007-12-19 20:15:47 +0000
committerScott Michel <scottm@aero.org>2007-12-19 20:15:47 +0000
commit170783a5fc13fff2878d4d347d8bd9096f2ef8d9 (patch)
tree2080350b2d374eb834db51b16cf185f8384cd5b2 /lib/Target/CellSPU/SPUISelLowering.cpp
parentf021f8a5acd5ed9d4651fd9b07edbe6b6c38635c (diff)
downloadexternal_llvm-170783a5fc13fff2878d4d347d8bd9096f2ef8d9.zip
external_llvm-170783a5fc13fff2878d4d347d8bd9096f2ef8d9.tar.gz
external_llvm-170783a5fc13fff2878d4d347d8bd9096f2ef8d9.tar.bz2
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU/SPUISelLowering.cpp')
-rw-r--r--lib/Target/CellSPU/SPUISelLowering.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/CellSPU/SPUISelLowering.cpp b/lib/Target/CellSPU/SPUISelLowering.cpp
index 253fafb..7d22187 100644
--- a/lib/Target/CellSPU/SPUISelLowering.cpp
+++ b/lib/Target/CellSPU/SPUISelLowering.cpp
@@ -880,13 +880,12 @@ LowerConstantFP(SDOperand Op, SelectionDAG &DAG) {
assert((FP != 0) &&
"LowerConstantFP: Node is not ConstantFPSDNode");
- const APFloat &apf = FP->getValueAPF();
-
if (VT == MVT::f32) {
+ float targetConst = FP->getValueAPF().convertToFloat();
return DAG.getNode(SPUISD::SFPConstant, VT,
- DAG.getTargetConstantFP(apf.convertToFloat(), VT));
+ DAG.getTargetConstantFP(targetConst, VT));
} else if (VT == MVT::f64) {
- uint64_t dbits = DoubleToBits(apf.convertToDouble());
+ uint64_t dbits = DoubleToBits(FP->getValueAPF().convertToDouble());
return DAG.getNode(ISD::BIT_CONVERT, VT,
LowerConstant(DAG.getConstant(dbits, MVT::i64), DAG));
}