diff options
| author | Lei Huang <lei@ca.ibm.com> | 2018-03-26 17:46:25 +0000 |
|---|---|---|
| committer | Lei Huang <lei@ca.ibm.com> | 2018-03-26 17:46:25 +0000 |
| commit | be0afb087055d5c23f0406e7219e3d7ded108d36 (patch) | |
| tree | 43d5ba79352586311784f2754397652923654b31 /llvm/test | |
| parent | 7341691502da22b268f2908fde59622c83c29f18 (diff) | |
| download | bcm5719-llvm-be0afb087055d5c23f0406e7219e3d7ded108d36.tar.gz bcm5719-llvm-be0afb087055d5c23f0406e7219e3d7ded108d36.zip | |
[Power9]Legalize and emit code for quad-precision convert from double-precision
Legalize and emit code for quad-precision floating point operation xscvdpqp
and add option to guard the quad precision operation support.
Differential Revision: https://reviews.llvm.org/D44746
llvm-svn: 328558
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/f128-arith.ll | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/f128-arith.ll b/llvm/test/CodeGen/PowerPC/f128-arith.ll index 3fa5566d9ea..857e6d5e641 100644 --- a/llvm/test/CodeGen/PowerPC/f128-arith.ll +++ b/llvm/test/CodeGen/PowerPC/f128-arith.ll @@ -1,4 +1,5 @@ -; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s +; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \ +; RUN: -enable-ppc-quad-precision < %s | FileCheck %s ; Function Attrs: norecurse nounwind define void @qpAdd(fp128* nocapture readonly %a, fp128* nocapture %res) { @@ -147,3 +148,30 @@ entry: ; CHECK: stxv ; CHECK: blr } + +; Function Attrs: norecurse nounwind +define void @dpConv2qp(double* nocapture readonly %a, fp128* nocapture %res) { +entry: + %0 = load double, double* %a, align 8 + %conv = fpext double %0 to fp128 + store fp128 %conv, fp128* %res, align 16 + ret void +; CHECK-LABEL: dpConv2qp +; CHECK-NOT: bl __extenddftf2 +; CHECK: lxsd +; CHECK: xscvdpqp +; CHECK: blr +} + +; Function Attrs: norecurse nounwind +define void @dpConv2qp_02(double %a, fp128* nocapture %res) { +entry: + %conv = fpext double %a to fp128 + store fp128 %conv, fp128* %res, align 16 + ret void +; CHECK-LABEL: dpConv2qp_02 +; CHECK-NOT: bl __extenddftf2 +; CHECK: xxlor +; CHECK: xscvdpqp +; CHECK: blr +} |

