x86: Enable FMA in rsqrt<mode>2 expander
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 23 Jan 2019 14:33:58 +0000 (06:33 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 9 Jul 2020 13:35:57 +0000 (06:35 -0700)
commitfab263ab0fc10ea08409b80afa7e8569438b8d28
treea8c93ef2193d9ce7dd7128a0956de024c56da927
parenta1e25d0008791118dd58eaddff5f4c3691f8750e
x86: Enable FMA in rsqrt<mode>2 expander

Enable FMA in rsqrt<mode>2 expander and fold rsqrtv16sf2 expander into
rsqrt<mode>2 expander which expands to UNSPEC_RSQRT28 for TARGET_AVX512ER.
Although it doesn't show performance change in our workloads, FMA can
improve other workloads.

gcc/

PR target/88713
* config/i386/i386-expand.c (ix86_emit_swsqrtsf): Enable FMA.
* config/i386/sse.md (VF_AVX512VL_VF1_128_256): New.
(rsqrt<mode>2): Replace VF1_128_256 with VF_AVX512VL_VF1_128_256.
(rsqrtv16sf2): Removed.

gcc/testsuite/

PR target/88713
* gcc.target/i386/pr88713-1.c: New test.
* gcc.target/i386/pr88713-2.c: Likewise.
gcc/config/i386/i386-expand.c
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/pr88713-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr88713-2.c [new file with mode: 0644]