diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-08-28 02:12:42 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-08-28 02:12:42 +0000 |
commit | adb14f56c7012bd7a8b472a2995da95935eefd59 (patch) | |
tree | 97502aab44773fb98a9a171fb3fad81873378576 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 686f2ee226bb7f34425cb7c1c9c6e7546267625d (diff) | |
download | bcm5719-llvm-adb14f56c7012bd7a8b472a2995da95935eefd59.tar.gz bcm5719-llvm-adb14f56c7012bd7a8b472a2995da95935eefd59.zip |
Fix bug 13532.
In SelectionDAGLegalize::ExpandLegalINT_TO_FP, expand INT_TO_FP nodes without
using any f64 operations if f64 is not a legal type.
Patch by Stefan Kristiansson.
llvm-svn: 162728
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 908ebb94864..7b341700b8b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2042,7 +2042,7 @@ SDValue SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned, SDValue Op0, EVT DestVT, DebugLoc dl) { - if (Op0.getValueType() == MVT::i32) { + if (Op0.getValueType() == MVT::i32 && TLI.isTypeLegal(MVT::f64)) { // simple 32-bit [signed|unsigned] integer to float/double expansion // Get the stack frame index of a 8 byte buffer. |