diff --git a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index 59de205f945..b3c910a3d74 100644 --- a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -143,9 +143,7 @@ namespace { { MVT::ValueType vt = FPN->getValueType(0); if (vt == MVT::f32) { - const APFloat &apf = FPN->getValueAPF(); - float fval = apf.convertToFloat(); - int val = *((int *) &fval); + int val = FloatToBits(FPN->getValueAPF().convertToFloat()); int sval = (int) ((val << 16) >> 16); Imm = (short) val; return val == sval;