[PowerPC] Add intrinsic to convert between ppc_fp128 and fp128
authorQiu Chaofan <qiucofan@cn.ibm.com>
Fri, 5 Nov 2021 08:58:38 +0000 (16:58 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Fri, 5 Nov 2021 08:58:38 +0000 (16:58 +0800)
commit5fd406e254b22f26743284729ec5da99cc927add
treeae253b64c415b495a6cfbfc42794689a72f23308
parentdf0ba47c36f6bd0865e3286853b76d37e037c2d7
[PowerPC] Add intrinsic to convert between ppc_fp128 and fp128

ppc_fp128 and fp128 are both 128-bit floating point types. However, we
can't do conversion between them now, since trunc/ext are not allowed
for same-size fp types.

This patch adds two new intrinsics: llvm.ppc.convert.f128.to.ppcf128 and
llvm.convert.ppcf128.to.f128, to support such conversion.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D109421
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/include/llvm/IR/RuntimeLibcalls.def
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/f128-truncateNconv.ll