OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ceb2cf
)
fix strict-aliasing violation
author
Chris Lattner
<sabre@nondot.org>
Sat, 22 Dec 2007 22:45:38 +0000
(22:45 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 22 Dec 2007 22:45:38 +0000
(22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45324
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/CellSPU/SPUISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
index
59de205
..
b3c910a
100644
(file)
--- 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;