i386: Fix wrong codegen for V8HF move without TARGET_AVX512F
authorHongyu Wang <hongyu.wang@intel.com>
Wed, 20 Oct 2021 05:13:39 +0000 (13:13 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 21 Oct 2021 08:58:28 +0000 (16:58 +0800)
commitc8a889fc0e115d40a2d02f32842655f3eadc8fa1
tree62e67f55a69fc6a37faeee49a9fbf4759ad44409
parentf5ef4da3ccdfbedb44cb21205527cfdbbec95cbd
i386: Fix wrong codegen for V8HF move without TARGET_AVX512F

Since _Float16 type is enabled under sse2 target, returning
V8HFmode vector without AVX512F target would generate wrong
vmovdqa64 instruction. Adjust ix86_get_ssemov to avoid this.

gcc/ChangeLog:
PR target/102812
* config/i386/i386.c (ix86_get_ssemov): Adjust HFmode vector
move to use the same logic as HImode.

gcc/testsuite/ChangeLog:
PR target/102812
* gcc.target/i386/pr102812.c: New test.
gcc/config/i386/i386.c
gcc/testsuite/gcc.target/i386/pr102812.c [new file with mode: 0644]