public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/3] xtensa: Addendum of the commit e33d2dcb463161a110ac345a451132ce8b2b23d9
       [not found] <396fafb2-efbc-ebb8-2047-8ddac66b0926.ref@yahoo.co.jp>
@ 2023-05-25 15:11 ` Takayuki 'January June' Suwa
  2023-05-26 10:20   ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Takayuki 'January June' Suwa @ 2023-05-25 15:11 UTC (permalink / raw)
  To: GCC Patches; +Cc: Max Filippov

gcc/ChangeLog:

	* config/xtensa/xtensa.md (*extzvsi-1bit_ashlsi3):
	Retract excessive line folding, and correct the value of
	the "length" insn attribute related to TARGET_DENSITY.
	(*extzvsi-1bit_addsubx): Ditto.
---
 gcc/config/xtensa/xtensa.md | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index 6c1d8ee8f81..11258125165 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -1009,8 +1009,7 @@
 	(ashift:SI (match_dup 0)
 		   (match_dup 3)))]
 {
-  int pos = INTVAL (operands[2]),
-      shift = floor_log2 (INTVAL (operands[3]));
+  int pos = INTVAL (operands[2]), shift = floor_log2 (INTVAL (operands[3]));
   switch (GET_CODE (operands[4]))
     {
     case ASHIFT:
@@ -1029,7 +1028,10 @@
 }
   [(set_attr "type"	"arith")
    (set_attr "mode"	"SI")
-   (set_attr "length"	"6")])
+   (set (attr "length")
+        (if_then_else (match_test "TARGET_DENSITY && INTVAL (operands[3]) == 2")
+		      (const_int 5)
+		      (const_int 6)))])
 
 (define_insn_and_split "*extzvsi-1bit_addsubx"
   [(set (match_operand:SI 0 "register_operand" "=a")
@@ -1053,8 +1055,7 @@
 			    (match_dup 4))
 		 (match_dup 2)]))]
 {
-  int pos = INTVAL (operands[3]),
-      shift = floor_log2 (INTVAL (operands[4]));
+  int pos = INTVAL (operands[3]), shift = floor_log2 (INTVAL (operands[4]));
   switch (GET_CODE (operands[6]))
     {
     case ASHIFT:
-- 
2.30.2

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

* Re: [PATCH 1/3] xtensa: Addendum of the commit e33d2dcb463161a110ac345a451132ce8b2b23d9
  2023-05-25 15:11 ` [PATCH 1/3] xtensa: Addendum of the commit e33d2dcb463161a110ac345a451132ce8b2b23d9 Takayuki 'January June' Suwa
@ 2023-05-26 10:20   ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2023-05-26 10:20 UTC (permalink / raw)
  To: Takayuki 'January June' Suwa; +Cc: GCC Patches

On Thu, May 25, 2023 at 8:13 AM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.md (*extzvsi-1bit_ashlsi3):
>         Retract excessive line folding, and correct the value of
>         the "length" insn attribute related to TARGET_DENSITY.
>         (*extzvsi-1bit_addsubx): Ditto.
> ---
>  gcc/config/xtensa/xtensa.md | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master with a more readable subject line.

-- 
Thanks.
-- Max

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

end of thread, other threads:[~2023-05-26 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <396fafb2-efbc-ebb8-2047-8ddac66b0926.ref@yahoo.co.jp>
2023-05-25 15:11 ` [PATCH 1/3] xtensa: Addendum of the commit e33d2dcb463161a110ac345a451132ce8b2b23d9 Takayuki 'January June' Suwa
2023-05-26 10:20   ` 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).