[PATCH] D48482: [Power9] [CLANG] Add __float128 support for trunc to double round to odd

Stefan Pintilie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 13:14:53 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC336596: [Power9] [CLANG] Add __float128 support for trunc to double round to odd (authored by stefanp, committed by ).
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D48482?vs=152466&id=154687#toc

Repository:
  rC Clang

https://reviews.llvm.org/D48482

Files:
  include/clang/Basic/BuiltinsPPC.def
  test/CodeGen/builtins-ppc-p9-f128.c


Index: include/clang/Basic/BuiltinsPPC.def
===================================================================
--- include/clang/Basic/BuiltinsPPC.def
+++ include/clang/Basic/BuiltinsPPC.def
@@ -430,6 +430,7 @@
 BUILTIN(__builtin_mulf128_round_to_odd, "LLdLLdLLd", "")
 BUILTIN(__builtin_divf128_round_to_odd, "LLdLLdLLd", "")
 BUILTIN(__builtin_fmaf128_round_to_odd, "LLdLLdLLdLLd", "")
+BUILTIN(__builtin_truncf128_round_to_odd, "dLLd", "")
 
 // HTM builtins
 BUILTIN(__builtin_tbegin, "UiUIi", "")
Index: test/CodeGen/builtins-ppc-p9-f128.c
===================================================================
--- test/CodeGen/builtins-ppc-p9-f128.c
+++ test/CodeGen/builtins-ppc-p9-f128.c
@@ -42,4 +42,9 @@
 // CHECK-NEXT: ret fp128
 }
 
+double testTruncOdd() {
+  return __builtin_truncf128_round_to_odd(A);
+// CHECK: @llvm.ppc.truncf128.round.to.odd(fp128
+// CHECK-NEXT: ret double
+}
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48482.154687.patch
Type: text/x-patch
Size: 896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180709/348df039/attachment.bin>


More information about the cfe-commits mailing list