public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] xtensa: Add RTX costs for if_then_else
@ 2022-07-29 19:31 Takayuki 'January June' Suwa
  2022-07-30  4:15 ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Takayuki 'January June' Suwa @ 2022-07-29 19:31 UTC (permalink / raw)
  To: GCC Patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] xtensa: Add RTX costs for if_then_else
  2022-07-29 19:31 [PATCH 1/2] xtensa: Add RTX costs for if_then_else Takayuki 'January June' Suwa
@ 2022-07-30  4:15 ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2022-07-30  4:15 UTC (permalink / raw)
  To: Takayuki 'January June' Suwa; +Cc: GCC Patches

On Fri, Jul 29, 2022 at 12:34 PM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> 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(+)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-30  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 19:31 [PATCH 1/2] xtensa: Add RTX costs for if_then_else Takayuki 'January June' Suwa
2022-07-30  4:15 ` Max Filippov

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).