[PATCH, PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 24 Jun 2020 20:28:24 +0000 (15:28 -0500)
committerWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 24 Jun 2020 21:08:46 +0000 (16:08 -0500)
commit58b475a2233630b1737bbdab986f08510d62cd3a
tree6a94749a66f04fae864eca8cac91d2539fef17bb
parentef6506e23691a72e1e724977e8ee8b9f3db74015
[PATCH, PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

Hi,
  Fix codegen for builtin vec_pack_to_short_fp32.  This includes adding
a define_insn for xvcvsphp, and adding a new define_expand for
convert_4f32_8f16.

2020-06-24  Will Schmidt  <will_schmidt@vnet.ibm.com>

PR target/94954

gcc
* config/rs6000/altivec.h (vec_pack_to_short_fp32): Update.
* config/rs6000/altivec.md (UNSPEC_CONVERT_4F32_8F16): New unspec.
(convert_4f32_8f16): New define_expand
* config/rs6000/rs6000-builtin.def (convert_4f32_8f16): New builtin define
and overload.
* config/rs6000/rs6000-call.c (P9V_BUILTIN_VEC_CONVERT_4F32_8F16): New
overloaded builtin entry.
* config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPHP): New unspec.
(vsx_xvcvsphp): New define_insn.

gcc/testsuite
* gcc.target/powerpc/builtins-1-p9-runnable.c: Update.
gcc/config/rs6000/altivec.h
gcc/config/rs6000/altivec.md
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/vsx.md
gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c