diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp --- a/llvm/lib/Support/APFloat.cpp +++ b/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 diff --git a/llvm/test/Transforms/InstCombine/bitcast-store.ll b/llvm/test/Transforms/InstCombine/bitcast-store.ll --- a/llvm/test/Transforms/InstCombine/bitcast-store.ll +++ b/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}