[PATCH] Fix makeLibCall argument (signed) in SoftenFloatRes_XINT_TO_FP function

Petar Jovanovic petar.jovanovic at imgtec.com
Tue Feb 10 15:32:21 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7292

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  llvm/trunk/test/CodeGen/Mips/mips64sinttofpsf.ll

Index: llvm/trunk/test/CodeGen/Mips/mips64sinttofpsf.ll
===================================================================
--- llvm/trunk/test/CodeGen/Mips/mips64sinttofpsf.ll
+++ llvm/trunk/test/CodeGen/Mips/mips64sinttofpsf.ll
@@ -0,0 +1,15 @@
+; RUN: llc -march=mips64 -mcpu=mips64r2 -soft-float -O0 < %s | FileCheck %s
+
+
+define double @foo() #0 {
+entry:
+  %x = alloca i32, align 4
+  store volatile i32 -32, i32* %x, align 4
+  %0 = load volatile i32* %x, align 4
+  %conv = sitofp i32 %0 to double
+  ret double %conv
+
+; CHECK-NOT:        dsll
+; CHECK-NOT:        dsrl
+
+}
Index: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -658,7 +658,7 @@
                            NVT, N->getOperand(0));
   return TLI.makeLibCall(DAG, LC,
                          TLI.getTypeToTransformTo(*DAG.getContext(), RVT),
-                         &Op, 1, false, dl).first;
+                         &Op, 1, Signed, dl).first;
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7292.19714.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150210/cf87c95b/attachment.bin>


More information about the llvm-commits mailing list