[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 03:17:36 PDT 2021
qiucf created this revision.
qiucf added reviewers: nemanjai, jsji, timshen, foad, shchenz, PowerPC.
Herald added subscribers: dexonsmith, hiraditya.
qiucf requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Commit 566690b0 <https://reviews.llvm.org/rG566690b067c8175314fa657b899c99bccf96821c> uses size information in float semantics, but `PPCDoubleDouble` left them empty.
As follow-up, we can consider remove `PPCDoubleDoubleLegacy` and fill other fields in the future.
Repository:
rG LLVM Github Monorepo
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
@@ -48,7 +48,7 @@
}
; CHECK-LABEL: @ppcf128_ones_store
-; CHECK: store ppc_fp128 0xM00000000000000000000000000000000, ppc_fp128* %dest, align 16
+; 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
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.378152.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211008/e698eb2e/attachment.bin>
More information about the llvm-commits
mailing list