Commit f45d5e71 authored by Qiu Chaofan's avatar Qiu Chaofan
Browse files

[APFloat] Set size of PPCDoubleDouble to 128

566690b0 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.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D111398
parent 573531fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ namespace llvm {
     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
+10 −0
Original line number Diff line number Diff line
@@ -47,6 +47,16 @@ entry:
  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}