]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Fix vfpclassph non-optimizied intrin
authorHaochen Jiang <haochen.jiang@intel.com>
Mon, 2 Sep 2024 07:00:22 +0000 (15:00 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Tue, 3 Sep 2024 08:45:05 +0000 (16:45 +0800)
commit9b312595f9ac073f55d858b6f833097608b40bba
tree95ca7fe3221c856e4b7e723936d1e3d3af54b856
parent14b65af6b400284a937e1d3be45579ee8cf8c32b
i386: Fix vfpclassph non-optimizied intrin

The intrin for non-optimized got a typo in mask type, which will cause
the high bits of __mmask32 being unexpectedly zeroed.

The test does not fail under O0 with current 1b since the testcase is
wrong. We need to include avx512-mask-type.h after SIZE is defined, or
it will always be __mmask8. That problem also happened in AVX10.2 testcases.
I will write a seperate patch to fix that.

gcc/ChangeLog:

* config/i386/avx512fp16intrin.h
(_mm512_mask_fpclass_ph_mask): Correct mask type to __mmask32.
(_mm512_fpclass_ph_mask): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/avx512fp16-vfpclassph-1c.c: New test.
gcc/config/i386/avx512fp16intrin.h
gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1c.c [new file with mode: 0644]