From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id C3B12398794B; Thu, 17 Sep 2020 16:44:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3B12398794B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600361056; bh=JVq5gcHecMmVjRfO8JBBd1kLpezOAM4WgGaWgjTxBPs=; h=From:To:Subject:Date:From; b=eEKNwVw0A3Xe+vnXTHbdgZALWBth5azOXwHwzKc619m4c1wlYbVvIwWZNMXjOzNm+ ToXk+MczN0x1Usx9JFWpp5rdMfBQdO64vewglRuJZGip1QC6GD8Rl16UOc7LrZoQ+q ULii3Y0125JtcGNxRtE9x2sQ4tv5kZjd6CsnwMAE= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] i386: Fix *vec_extractv2sf_1 and *vec_extractv2sf_1 shufps alternative [PR93828] X-Act-Checkin: gcc X-Git-Author: Uros Bizjak X-Git-Refname: refs/vendors/redhat/heads/gcc-8-branch X-Git-Oldrev: 4c7ece42cdec58361c6a75a15b1afed7139aad88 X-Git-Newrev: 923e9ba9da63bc01efeb690009cf3fa843c467cb Message-Id: <20200917164416.C3B12398794B@sourceware.org> Date: Thu, 17 Sep 2020 16:44:16 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 16:44:16 -0000 https://gcc.gnu.org/g:923e9ba9da63bc01efeb690009cf3fa843c467cb commit 923e9ba9da63bc01efeb690009cf3fa843c467cb Author: Uros Bizjak Date: Thu Feb 20 22:00:45 2020 +0100 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. Diff: --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/mmx.md | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b83eb4e5d0a..681d02f87c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-02-20 Uroš Bizjak + + 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 Bernd Edlinger * collect2.c (tool_cleanup): Avoid calling not signal-safe diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index f8575c63435..8fb355f03e3 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -608,13 +608,13 @@ (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 && !(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} # # # @@ -1302,13 +1302,13 @@ (define_insn "*vec_extractv2si_1" [(set (match_operand:SI 0 "nonimmediate_operand" "=y,x,x,y,x,r") (vec_select:SI - (match_operand:V2SI 1 "nonimmediate_operand" " 0,x,x,o,o,o") + (match_operand:V2SI 1 "nonimmediate_operand" " 0,x,0,o,o,o") (parallel [(const_int 1)])))] "TARGET_MMX && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ punpckhdq\t%0, %0 %vpshufd\t{$0xe5, %1, %0|%0, %1, 0xe5} - shufps\t{$0xe5, %1, %0|%0, %1, 0xe5} + shufps\t{$0xe5, %0, %0|%0, %0, 0xe5} # # #"