llvm.org GIT mirror llvm / d3ada75
fix strict-aliasing violation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45324 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 1 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
142142 {
143143 MVT::ValueType vt = FPN->getValueType(0);
144144 if (vt == MVT::f32) {
145 const APFloat &apf = FPN->getValueAPF();
146 float fval = apf.convertToFloat();
147 int val = *((int *) &fval);
145 int val = FloatToBits(FPN->getValueAPF().convertToFloat());
148146 int sval = (int) ((val << 16) >> 16);
149147 Imm = (short) val;
150148 return val == sval;