[PATCH] D52649: [mips] Mark fmaxl as a long double emulation routine
Stefan Maksimovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 12 01:21:25 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL344326: [mips] Mark fmaxl as a long double emulation routine (authored by smaksimovic, committed by ).
Herald added a subscriber: jrtc27.
Changed prior to commit:
https://reviews.llvm.org/D52649?vs=167469&id=169356#toc
Repository:
rL LLVM
https://reviews.llvm.org/D52649
Files:
llvm/trunk/lib/Target/Mips/MipsCCState.cpp
llvm/trunk/test/CodeGen/Mips/cconv/fmaxl_call.ll
Index: llvm/trunk/test/CodeGen/Mips/cconv/fmaxl_call.ll
===================================================================
--- llvm/trunk/test/CodeGen/Mips/cconv/fmaxl_call.ll
+++ llvm/trunk/test/CodeGen/Mips/cconv/fmaxl_call.ll
@@ -0,0 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=mips64el-unknown-linux-gnu -mcpu=mips64 < %s | FileCheck %s
+
+define fp128 @call_fmaxl(fp128 %a, fp128 %b) {
+; CHECK-LABEL: call_fmaxl:
+; CHECK: # %bb.0:
+; CHECK-NEXT: daddiu $sp, $sp, -16
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
+; CHECK-NEXT: .cfi_offset 31, -8
+; CHECK-NEXT: jal fmaxl
+; CHECK-NEXT: nop
+; CHECK-NEXT: mov.d $f12, $f0
+; CHECK-NEXT: jal f
+; CHECK-NEXT: mov.d $f13, $f2
+; CHECK-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
+; CHECK-NEXT: jr $ra
+; CHECK-NEXT: daddiu $sp, $sp, 16
+ %1 = call fp128 @llvm.maxnum.f128(fp128 %a, fp128 %b)
+ %2 = call fp128 @f(fp128 %1)
+ ret fp128 %2
+}
+
+declare fp128 @llvm.maxnum.f128(fp128, fp128)
+declare fp128 @f(fp128)
Index: llvm/trunk/lib/Target/Mips/MipsCCState.cpp
===================================================================
--- llvm/trunk/lib/Target/Mips/MipsCCState.cpp
+++ llvm/trunk/lib/Target/Mips/MipsCCState.cpp
@@ -24,10 +24,10 @@
"__lttf2", "__multf3", "__netf2", "__powitf2",
"__subtf3", "__trunctfdf2", "__trunctfsf2", "__unordtf2",
"ceill", "copysignl", "cosl", "exp2l",
- "expl", "floorl", "fmal", "fmodl",
- "log10l", "log2l", "logl", "nearbyintl",
- "powl", "rintl", "roundl", "sinl",
- "sqrtl", "truncl"};
+ "expl", "floorl", "fmal", "fmaxl",
+ "fmodl", "log10l", "log2l", "logl",
+ "nearbyintl", "powl", "rintl", "roundl",
+ "sinl", "sqrtl", "truncl"};
// Check that LibCalls is sorted alphabetically.
auto Comp = [](const char *S1, const char *S2) { return strcmp(S1, S2) < 0; };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52649.169356.patch
Type: text/x-patch
Size: 2192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181012/174c309b/attachment.bin>
More information about the llvm-commits
mailing list