[llvm] r188106 - Add another intrinsic that LLVM gives an incorrect prototype to.

Reed Kotler rkotler at mips.com
Fri Aug 9 14:33:41 PDT 2013


Author: rkotler
Date: Fri Aug  9 16:33:41 2013
New Revision: 188106

URL: http://llvm.org/viewvc/llvm-project?rev=188106&view=rev
Log:
Add another intrinsic that LLVM gives an incorrect prototype to.
I need to go through all the runtime routine list and see if there
are any more I need to add for mips16 floating point. Prototypes must
be correct or else I don't know to add a helper function call.


Added:
    llvm/trunk/test/CodeGen/Mips/fixdfsf.ll
Modified:
    llvm/trunk/lib/Target/Mips/Mips16ISelLowering.cpp

Modified: llvm/trunk/lib/Target/Mips/Mips16ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips16ISelLowering.cpp?rev=188106&r1=188105&r2=188106&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Mips16ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/Mips16ISelLowering.cpp Fri Aug  9 16:33:41 2013
@@ -90,6 +90,7 @@ static const Mips16Libcall HardFloatLibC
 };
 
 static const Mips16IntrinsicHelperType Mips16IntrinsicHelper[] = {
+  {"__fixunsdfsi", "__mips16_call_stub_2" },
   {"ceil",  "__mips16_call_stub_df_2"},
   {"ceilf", "__mips16_call_stub_sf_1"},
   {"copysign",  "__mips16_call_stub_df_10"},

Added: llvm/trunk/test/CodeGen/Mips/fixdfsf.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/fixdfsf.ll?rev=188106&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/fixdfsf.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/fixdfsf.ll Fri Aug  9 16:33:41 2013
@@ -0,0 +1,18 @@
+; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=pic1
+; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=pic2
+
+ at x = common global double 0.000000e+00, align 8
+ at y = common global i32 0, align 4
+
+; Function Attrs: nounwind optsize
+define void @foo()  {
+entry:
+  %0 = load double* @x, align 8
+  %conv = fptoui double %0 to i32
+  store i32 %conv, i32* @y, align 4
+; pic1:	lw	${{[0-9]+}}, %call16(__fixunsdfsi)(${{[0-9]+}})
+; pic2:	lw	${{[0-9]+}}, %got(__mips16_call_stub_2)(${{[0-9]+}})
+  ret void
+}
+
+





More information about the llvm-commits mailing list