[PATCH] D111398: [APFloat] Set size of PPCDoubleDouble to 128

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 19:14:03 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf45d5e71d3e1: [APFloat] Set size of PPCDoubleDouble to 128 (authored by qiucf).

Changed prior to commit:
  https://reviews.llvm.org/D111398?vs=378152&id=378396#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111398/new/

https://reviews.llvm.org/D111398

Files:
  llvm/lib/Support/APFloat.cpp
  llvm/test/Transforms/InstCombine/bitcast-store.ll


Index: llvm/test/Transforms/InstCombine/bitcast-store.ll
===================================================================
--- llvm/test/Transforms/InstCombine/bitcast-store.ll
+++ llvm/test/Transforms/InstCombine/bitcast-store.ll
@@ -47,6 +47,16 @@
   ret void
 }
 
+; CHECK-LABEL: @ppcf128_ones_store
+; CHECK: store ppc_fp128 0xMFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, ppc_fp128* %dest, align 16
+define void @ppcf128_ones_store(ppc_fp128* %dest) {
+entry:
+  %int = or i128 0, 340282366920938463463374607431768211455 ; 128 ones
+  %val = bitcast i128 %int to ppc_fp128
+  store ppc_fp128 %val, ppc_fp128* %dest, align 16
+  ret void
+}
+
 !0 = !{!1}
 !1 = !{!1, !2}
 !2 = !{!2}
Index: llvm/lib/Support/APFloat.cpp
===================================================================
--- llvm/lib/Support/APFloat.cpp
+++ llvm/lib/Support/APFloat.cpp
@@ -92,7 +92,7 @@
      Note: we need to make the value different from semBogus as otherwise
      an unsafe optimization may collapse both values to a single address,
      and we heavily rely on them having distinct addresses.             */
-  static const fltSemantics semPPCDoubleDouble = {-1, 0, 0, 0};
+  static const fltSemantics semPPCDoubleDouble = {-1, 0, 0, 128};
 
   /* These are legacy semantics for the fallback, inaccrurate implementation of
      IBM double-double, if the accurate semPPCDoubleDouble doesn't handle the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111398.378396.patch
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211009/e61e4c94/attachment.bin>


More information about the llvm-commits mailing list