public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jojo R <rjiejie@linux.alibaba.com>
To: GCC Development <gcc@gcc.gnu.org>
Subject: How to describe ‘earlyclobber’ explicitly for specific source operand ?
Date: Fri, 19 Nov 2021 15:28:02 +0800	[thread overview]
Message-ID: <1b032580-97c7-41c5-9930-9a7354ae4151@Spark> (raw)
In-Reply-To: <eb109969-0133-49eb-b392-b35a065f12ba@Spark>

Hi,

	We know gcc supply earlyclobber function to avoid register overlap,

	but it can not describe explicitly for specific source operand, is it right ?

	The vector ISA spec of risc-v describe some register overlap rules here:

	https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#sec-vec-operands

	e.g.

	# Widening signed integer add/subtract, 2*SEW = 2*SEW +/- SEW
	vwadd.wv vd, vs2, vs1, vm # vector-vector

	it means vd can overlap vs2, but can not overlap vs1,
	there are more registers are wasted if gcc can not describe earlyclobber of vd only for vs1,
	also gcc will generate extra REG-REG move instruction :(

	Any suggestions ?

Thanks.

— Jojo

       reply	other threads:[~2021-11-19  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <eb109969-0133-49eb-b392-b35a065f12ba@Spark>
2021-11-19  7:28 ` Jojo R [this message]
2021-11-19 21:54   ` Peter Bergner
2021-11-22  6:40     ` Jojo R
2021-11-23 12:22       ` Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b032580-97c7-41c5-9930-9a7354ae4151@Spark \
    --to=rjiejie@linux.alibaba.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).