R600: Remove unsafe type punning. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-07-12 20:18:05 +00:00
parent 94803598aa
commit 795740b591

View File

@ -22,9 +22,8 @@ def LO32 : SDNodeXForm<imm, [{
}]>;
def LO32f : SDNodeXForm<fpimm, [{
uint64_t val = N->getValueAPF().bitcastToAPInt().getZExtValue() & 0xffffffff;
float *fval = reinterpret_cast<float *>(&val);
return CurDAG->getTargetConstantFP(*fval, MVT::f32);
APInt V = N->getValueAPF().bitcastToAPInt().trunc(32);
return CurDAG->getTargetConstantFP(APFloat(APFloat::IEEEsingle, V), MVT::f32);
}]>;
// Transformation function, extract the upper 32bit of a 64bit immediate
@ -33,9 +32,8 @@ def HI32 : SDNodeXForm<imm, [{
}]>;
def HI32f : SDNodeXForm<fpimm, [{
uint64_t val = N->getValueAPF().bitcastToAPInt().getZExtValue() >> 32;
float *fval = reinterpret_cast<float *>(&val);
return CurDAG->getTargetConstantFP(*fval, MVT::f32);
APInt V = N->getValueAPF().bitcastToAPInt().lshr(32).trunc(32);
return CurDAG->getTargetConstantFP(APFloat(APFloat::IEEEsingle, V), MVT::f32);
}]>;
def IMM8bitDWORD : ImmLeaf <