i386: Fix *vec_extractv2sf_1 and *vec_extractv2sf_1 shufps alternative [PR93828]
authorUros Bizjak <ubizjak@gmail.com>
Thu, 20 Feb 2020 20:04:44 +0000 (21:04 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 20 Feb 2020 20:04:44 +0000 (21:04 +0100)
commitf6088573d81d52e8573b704984fdb515e4391b1a
treef5dad0e790edede832e562bd93d254b045e0e7d8
parent6e63438a0d7085e508d82063af2f04d26fa46494
i386: Fix *vec_extractv2sf_1 and *vec_extractv2sf_1 shufps alternative [PR93828]

shufps moves two of the four packed single-precision floating-point values
from *destination* operand (first operand) into the low quadword of the
destination operand.  Match source operand to the destination.

PR target/93828
* config/i386/mmx.md (*vec_extractv2sf_1): Match source operand
to destination operand for shufps alternative.
(*vec_extractv2si_1): Ditto.

testsuite/ChangeLog:

PR target/93828
* g++.target/i386/pr93828.C: New test.
gcc/testsuite/g++.target/i386/pr93828.C [new file with mode: 0644]