From: Andrew Stubbs Date: Thu, 22 Sep 2022 11:48:30 +0000 (+0100) Subject: amdgcn: Add vector integer negate insn X-Git-Tag: basepoints/gcc-14~3983 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf6b5c74a6f1927174091c73aa51401895ef92f0;p=thirdparty%2Fgcc.git 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 --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md index f708e587f387..00c0e3be1ea4 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