From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 00237385AE4F for ; Tue, 11 Oct 2022 11:04:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00237385AE4F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,176,1661846400"; d="scan'208";a="84478907" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 11 Oct 2022 03:04:18 -0800 IronPort-SDR: qdISgpG0UxyzF1bAtP56kI0xroB7F3X5URtRPrM/sZDZJ4ujuAe4nQ8NqTBXIJ0Rsqjqdq8O2G lCRtJQ1mvoKbPiM0CPGEeojc/ymDEEKYfSyG7WQu5/N0AL1qa3LS3U+fmBeU+nbDIp+cswYpXc KHWCyw1wWj79ZYevOpr8UQ26N4fIOnfGzS29OtnlBzhxp0vMOpsIWEBylXFc1uDJd0T+o8ydHa WuOKJ3l1L/S3h8T/VlC7WoPceudpW7oonWRTcye9t+jroVHWzRNInHHQM4OrCQKW2DNp3eAond FfU= From: Andrew Stubbs To: Subject: [committed 5/6] amdgcn: Add vector integer negate insn Date: Tue, 11 Oct 2022 12:02:07 +0100 Message-ID: X-Mailer: git-send-email 2.37.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.37.0" Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --------------2.37.0 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: 8bit Another example of the vectorizer needing explicit insns where the scalar expander just works. gcc/ChangeLog: * config/gcn/gcn-valu.md (neg2): New define_expand. --- gcc/config/gcn/gcn-valu.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) --------------2.37.0 Content-Type: text/x-patch; name="0005-amdgcn-Add-vector-integer-negate-insn.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0005-amdgcn-Add-vector-integer-negate-insn.patch" diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md index f708e587f38..00c0e3be1ea 100644 --- a/gcc/config/gcn/gcn-valu.md +++ b/gcc/config/gcn/gcn-valu.md @@ -2390,6 +2390,19 @@ (define_insn "3" [(set_attr "type" "vop2,ds") (set_attr "length" "8,8")]) +;; }}} +;; {{{ Int unops + +(define_expand "neg2" + [(match_operand:V_INT 0 "register_operand") + (match_operand:V_INT 1 "register_operand")] + "" + { + emit_insn (gen_sub3 (operands[0], gcn_vec_constant (mode, 0), + operands[1])); + DONE; + }) + ;; }}} ;; {{{ FP binops - special cases --------------2.37.0--