mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
fix strict-aliasing violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ceb2cfa8e
commit
d3ada751c3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user