diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2020-02-20 21:06:18 +0100 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2020-02-20 21:06:18 +0100 |
commit | d56779b8ae587c599bf46b20587afcd6ee51fcaa (patch) | |
tree | 186a6e3dee264a5a076c9c2d2cb4c2ac944635e1 /gcc | |
parent | f6088573d81d52e8573b704984fdb515e4391b1a (diff) | |
download | gcc-d56779b8ae587c599bf46b20587afcd6ee51fcaa.zip gcc-d56779b8ae587c599bf46b20587afcd6ee51fcaa.tar.gz gcc-d56779b8ae587c599bf46b20587afcd6ee51fcaa.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/mmx.md | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 |
3 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 95c883e..15ce49c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-02-20 Uroš Bizjak <ubizjak@gmail.com> + + PR target/93828 + * config/i386/mmx.md (*vec_extractv2sf_1): Match source operand + to destination operand for shufps alternative. + (*vec_extractv2si_1): Ditto. + 2020-02-20 Peter Bergner <bergner@linux.ibm.com> PR target/93658 diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index f695831..e1c8b0a 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -645,14 +645,14 @@ (define_insn "*vec_extractv2sf_1" [(set (match_operand:SF 0 "nonimmediate_operand" "=y,x,x,y,x,f,r") (vec_select:SF - (match_operand:V2SF 1 "nonimmediate_operand" " 0,x,x,o,o,o,o") + (match_operand:V2SF 1 "nonimmediate_operand" " 0,x,0,o,o,o,o") (parallel [(const_int 1)])))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ punpckhdq\t%0, %0 %vmovshdup\t{%1, %0|%0, %1} - shufps\t{$0xe5, %1, %0|%0, %1, 0xe5} + shufps\t{$0xe5, %0, %0|%0, %0, 0xe5} # # # @@ -1794,7 +1794,7 @@ (define_insn "*vec_extractv2si_1" [(set (match_operand:SI 0 "nonimmediate_operand" "=y,rm,x,x,y,x,r") (vec_select:SI - (match_operand:V2SI 1 "nonimmediate_operand" " 0,x ,x,x,o,o,o") + (match_operand:V2SI 1 "nonimmediate_operand" " 0,x ,x,0,o,o,o") (parallel [(const_int 1)])))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && !(MEM_P (operands[0]) && MEM_P (operands[1]))" @@ -1802,7 +1802,7 @@ punpckhdq\t%0, %0 %vpextrd\t{$1, %1, %0|%0, %1, 1} %vpshufd\t{$0xe5, %1, %0|%0, %1, 0xe5} - shufps\t{$0xe5, %1, %0|%0, %1, 0xe5} + shufps\t{$0xe5, %0, %0|%0, %0, 0xe5} # # #" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e0399e0..d6a153e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-20 Uroš Bizjak <ubizjak@gmail.com> + + PR target/93828 + * g++.target/i386/pr93828.C: New test. + 2020-02-20 Peter Bergner <bergner@linux.ibm.com> PR target/93658 |