[PATCH] D39615: [CodeGen] add remquo to list of recognized library calls

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 4 08:03:49 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL317407: [CodeGen] add remquo to list of recognized library calls (authored by spatel).

Changed prior to commit:
  https://reviews.llvm.org/D39615?vs=121536&id=121591#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39615

Files:
  cfe/trunk/include/clang/Basic/Builtins.def
  cfe/trunk/test/CodeGen/libcalls-errno.c


Index: cfe/trunk/test/CodeGen/libcalls-errno.c
===================================================================
--- cfe/trunk/test/CodeGen/libcalls-errno.c
+++ cfe/trunk/test/CodeGen/libcalls-errno.c
@@ -418,10 +418,14 @@
 // HAS_ERRNO: declare float @remainderf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[NOT_READNONE]]
 
-//
-// FIXME: remquo is not recognized as a mathlib call.
-//
-  // remquo(f,f,i);  remquof(f,f,i); remquol(f,f,i);
+  remquo(f,f,i);  remquof(f,f,i); remquol(f,f,i);
+
+// NO__ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
+// NO__ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
+// NO__ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
+// HAS_ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
+// HAS_ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
+// HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
 
   rint(f);       rintf(f);      rintl(f);
 
Index: cfe/trunk/include/clang/Basic/Builtins.def
===================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def
+++ cfe/trunk/include/clang/Basic/Builtins.def
@@ -1162,6 +1162,10 @@
 LIBBUILTIN(remainderf, "fff", "fne", "math.h", ALL_LANGUAGES)
 LIBBUILTIN(remainderl, "LdLdLd", "fne", "math.h", ALL_LANGUAGES)
 
+LIBBUILTIN(remquo, "dddi*", "fn", "math.h", ALL_LANGUAGES)
+LIBBUILTIN(remquof, "fffi*", "fn", "math.h", ALL_LANGUAGES)
+LIBBUILTIN(remquol, "LdLdLdi*", "fn", "math.h", ALL_LANGUAGES)
+
 LIBBUILTIN(rint, "dd", "fnc", "math.h", ALL_LANGUAGES)
 LIBBUILTIN(rintf, "ff", "fnc", "math.h", ALL_LANGUAGES)
 LIBBUILTIN(rintl, "LdLd", "fnc", "math.h", ALL_LANGUAGES)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39615.121591.patch
Type: text/x-patch
Size: 1794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171104/ab586044/attachment-0001.bin>


More information about the cfe-commits mailing list