re PR target/72867 (SSE/AVX/AVX512: incorrect optimization of VMINPS/VMAXPS at compil...
authorUros Bizjak <ubizjak@gmail.com>
Mon, 15 Aug 2016 18:46:53 +0000 (20:46 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 15 Aug 2016 18:46:53 +0000 (20:46 +0200)
commit432baa029c933e11934dddfd7ec355dcbdb4ea67
tree3d80b7ede24baff6d342431517b6fd266918e311
parent87155d4f6c847cd072321424831fd0ffb405265d
re PR target/72867 (SSE/AVX/AVX512: incorrect optimization of VMINPS/VMAXPS at compile time)

PR target/72867
* config/i386/sse.md (<code><mode>3<mask_name><round_saeonly_name>):
Emit ieee_<ieee_maxmin><mode>3<mask_name><round_saeonly_name>
for !flag_finite_math_only or flag_signed_zeros.
(*<code><mode>3<mask_name><round_saeonly_name>): Rename from
*<code><mode>3_finite<mask_name><round_saeonly_name>.  Do not
depend on flag_finite_math_only.
(ieee_<ieee_maxmin><mode>3<mask_name><round_saeonly_name>):
New insn pattern.
(*<code><mode>3<mask_name><round_saeonly_name>): Remove.
(*ieee_smin<mode>3): Ditto.
(*ieee_smax<mode>3): Ditto.
* config/i386/mmx.md (mmx_<code>v2sf3): Emit
mmx_ieee_<ieee_maxmin>v2sf3 for !flag_finite_math_only or
flag_signed_zeros.
(*mmx_<code>v2sf3): Rename from *mmx_<code>v2sf3_finite.  Do not
depend on flag_finite_math_only.
(mmx_ieee_<ieee_maxmin>v2sf3): New insn pattern.
(*mmx_<code>v2sf3): Remove.
* config/i386/subst.md (round_saeonly_mask_arg3): New subst attribute.
* config/i386/i386.c (ix86_expand_sse_fp_mimnax): Check
flag_signed_zeros instead of !flag_unsafe_math_optimizations.

testsuite/ChangeLog:

PR target/72867
* gcc.target/i386/pr72867.c: New test.

From-SVN: r239487
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/config/i386/mmx.md
gcc/config/i386/sse.md
gcc/config/i386/subst.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr72867.c [new file with mode: 0644]