public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH 1/2] xtensa: Add RTX costs for if_then_else
Date: Sat, 30 Jul 2022 04:31:44 +0900	[thread overview]
Message-ID: <257377a9-c976-ec6a-9ce0-c26e3008a0dc@yahoo.co.jp> (raw)

It takes one machine instruction for both condtional branch and move.

gcc/ChangeLog:

	* config/xtensa/xtensa.cc (xtensa_rtx_costs):
	Add new case for IF_THEN_ELSE.
---
 gcc/config/xtensa/xtensa.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index a851a7ae6b3..6ac879c38fb 100644
--- a/gcc/config/xtensa/xtensa.cc
+++ b/gcc/config/xtensa/xtensa.cc
@@ -4273,6 +4273,7 @@ xtensa_rtx_costs (rtx x, machine_mode mode, int outer_code,
 
     case ZERO_EXTRACT:
     case ZERO_EXTEND:
+    case IF_THEN_ELSE:
       *total = COSTS_N_INSNS (1);
       return true;
 
-- 
2.20.1

             reply	other threads:[~2022-07-29 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 19:31 Takayuki 'January June' Suwa [this message]
2022-07-30  4:15 ` Max Filippov

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=257377a9-c976-ec6a-9ce0-c26e3008a0dc@yahoo.co.jp \
    --to=jjsuwa_sys3175@yahoo.co.jp \
    --cc=gcc-patches@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).