From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 50EBC3857703 for ; Thu, 25 May 2023 07:34:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50EBC3857703 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B66E1042; Thu, 25 May 2023 00:34:57 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 872603F762; Thu, 25 May 2023 00:34:11 -0700 (PDT) From: Richard Sandiford To: Prathamesh Kulkarni Mail-Followup-To: Prathamesh Kulkarni ,gcc Patches , richard.sandiford@arm.com Cc: gcc Patches Subject: Re: [aarch64] Code-gen for vector initialization involving constants References: Date: Thu, 25 May 2023 08:34:10 +0100 In-Reply-To: (Prathamesh Kulkarni's message of "Thu, 25 May 2023 12:17:45 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-28.5 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: LGTM, just a couple of comment tweaks: Prathamesh Kulkarni writes: > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc > index d6fc94015fa..db7ca4c28c3 100644 > --- a/gcc/config/aarch64/aarch64.cc > +++ b/gcc/config/aarch64/aarch64.cc > @@ -22332,6 +22332,46 @@ aarch64_unzip_vector_init (machine_mode mode, rtx vals, bool even_p) > return gen_rtx_PARALLEL (new_mode, vec); > } > > +/* Return true if INSN is a scalar move. */ s/INSN/SET/ > + > +static bool > +scalar_move_insn_p (rtx set) > +{ > + rtx src = SET_SRC (set); > + rtx dest = SET_DEST (set); > + return (is_a (GET_MODE (dest)) > + && aarch64_mov_operand (src, GET_MODE (dest))); > +} > + > +/* Similar to seq_cost, but ignore cost for scalar moves. This function > + is called from aarch64_expand_vector_init. */ Probably best to drop the second sentence. OK with those changes, thanks (no need to retest). Richard