Fix zero-masking for vcvtps2ph when dest operand is memory.
authorliuhongt <hongtao.liu@intel.com>
Fri, 29 May 2020 05:38:49 +0000 (13:38 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 4 Jun 2020 12:04:40 +0000 (20:04 +0800)
commit43088bb4dadd3d14b6b594c5f9363fe879f3d7f7
tree79ff52c44967f5e91a11e20c3269f538aac102b6
parent53ec04cbdd192468d1975640759084f4e37fe4e8
Fix zero-masking for vcvtps2ph when dest operand is memory.

When dest is memory, zero-masking is not valid, only merging-masking is available,

2020-06-24  Hongtao Liu  <hongtao.liu@inte.com>

gcc/ChangeLog:
PR target/95254
* config/i386/sse.md (*vcvtps2ph_store<merge_mask_name>):
Refine from *vcvtps2ph_store<mask_name>.
(vcvtps2ph256<mask_name>): Refine constraint from vm to v.
(<mask_codefor>avx512f_vcvtps2ph512<mask_name>): Ditto.
(*vcvtps2ph256<merge_mask_name>): New define_insn.
(*avx512f_vcvtps2ph512<merge_mask_name>): Ditto.
* config/i386/subst.md (merge_mask): New define_subst.
(merge_mask_name): New define_subst_attr.
(merge_mask_operand3): Ditto.

gcc/testsuite/ChangeLog:
* gcc.target/i386/avx512f-vcvtps2ph-pr95254.c: New test.
* gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c: Ditto.
gcc/config/i386/sse.md
gcc/config/i386/subst.md
gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-pr95254.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c [new file with mode: 0644]