From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1461) id C9E913857B8A; Tue, 11 Oct 2022 11:01:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9E913857B8A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665486116; bh=VqHYyyuDpILz+ZLNRkyGO/PwJztRnamf4e6uY3C9iMs=; h=From:To:Subject:Date:From; b=ylCYeuziL6khmCNghJaZ4FxFIXJCT4/EfjPe4/+EHPcUCruRKloecbjVf+am6DivT PrYBQqtMEon1sPKVk5qsVhSbTBRGNVGyiGW+com9RDDrliW/DVR8BNlhv6zKqCigLQ cKYO/KB6DQRqlJKl615IAE4URlIhx6bL0EblaCa0= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andrew Stubbs To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3224] amdgcn: Add vector integer negate insn X-Act-Checkin: gcc X-Git-Author: Andrew Stubbs X-Git-Refname: refs/heads/master X-Git-Oldrev: 769a10d0fc45e4923d7eb631170a117529ad5e39 X-Git-Newrev: bf6b5c74a6f1927174091c73aa51401895ef92f0 Message-Id: <20221011110156.C9E913857B8A@sourceware.org> Date: Tue, 11 Oct 2022 11:01:56 +0000 (GMT) List-Id: https://gcc.gnu.org/g:bf6b5c74a6f1927174091c73aa51401895ef92f0 commit r13-3224-gbf6b5c74a6f1927174091c73aa51401895ef92f0 Author: Andrew Stubbs Date: Thu Sep 22 12:48:30 2022 +0100 amdgcn: Add vector integer negate insn 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. Diff: --- gcc/config/gcn/gcn-valu.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 @@ [(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