public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [x86_64 PATCH] Use [(const_int 0)] idiom consistently in i386.md
@ 2023-05-10 19:20 Roger Sayle
  2023-05-10 19:50 ` Uros Bizjak
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Sayle @ 2023-05-10 19:20 UTC (permalink / raw)
  To: 'GCC Patches'; +Cc: 'Uros Bizjak'

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]


Hi Uros,
This cleans up the use of [(clobber (const_int 0))] in the i386 backend.
My apologies I must have copied this idiom from one of the other targets:
aarch64.md, arm.md, thumb1.md, avr.md, or sparc.md.

This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
and make -k check, both with and without --target_board=unix{-m32}
with no new failures.  Ok for mainline?


2023-05-10  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
        * config/i386/i386.md (*concat<mode><dwi>3_1): Use preferred
        [(const_int 0)] idiom, instead of [(clobber (const_int 0))].
        (*concat<mode><dwi>3_2): Likewise.
        (*concat<mode><dwi>3_3): Likewise.
        (*concat<mode><dwi>3_4): Likewise.
        (*concat<mode><dwi>3_5): Likewise.
        (*concat<mode><dwi>3_6): Likewise.
        (*concat<mode><dwi>3_7): Likewise.


Thanks,
Roger
--


[-- Attachment #2: patchcl.txt --]
[-- Type: text/plain, Size: 1948 bytes --]

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index cf90867..f2dd67e 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -11584,7 +11584,7 @@
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   split_double_concat (<DWI>mode, operands[0], operands[3],
 		       gen_lowpart (<MODE>mode, operands[1]));
@@ -11601,7 +11601,7 @@
   "INTVAL (operands[3]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   split_double_concat (<DWI>mode, operands[0], operands[1],
 		       gen_lowpart (<MODE>mode, operands[2]));
@@ -11620,7 +11620,7 @@
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   split_double_concat (<DWI>mode, operands[0], operands[3], operands[1]);
   DONE;
@@ -11638,7 +11638,7 @@
   "INTVAL (operands[3]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   split_double_concat (<DWI>mode, operands[0], operands[1], operands[2]);
   DONE;
@@ -11665,7 +11665,7 @@
 					VOIDmode))"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   rtx op3 = simplify_subreg (<HALF>mode, operands[3], <MODE>mode, 0);
   split_double_concat (<MODE>mode, operands[0], op3,
@@ -11697,7 +11697,7 @@
 					VOIDmode))"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   rtx op3 = simplify_subreg (<MODE>mode, operands[3], <DWI>mode, 0);
   split_double_concat (<DWI>mode, operands[0], op3, operands[1]);
@@ -11723,7 +11723,7 @@
 				       VOIDmode)"
   "#"
   "&& reload_completed"
-  [(clobber (const_int 0))]
+  [(const_int 0)]
 {
   rtx op2;
   if (<DWI>mode == DImode)

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

* Re: [x86_64 PATCH] Use [(const_int 0)] idiom consistently in i386.md
  2023-05-10 19:20 [x86_64 PATCH] Use [(const_int 0)] idiom consistently in i386.md Roger Sayle
@ 2023-05-10 19:50 ` Uros Bizjak
  0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2023-05-10 19:50 UTC (permalink / raw)
  To: Roger Sayle; +Cc: GCC Patches

On Wed, May 10, 2023 at 9:20 PM Roger Sayle <roger@nextmovesoftware.com> wrote:
>
>
> Hi Uros,
> This cleans up the use of [(clobber (const_int 0))] in the i386 backend.
> My apologies I must have copied this idiom from one of the other targets:
> aarch64.md, arm.md, thumb1.md, avr.md, or sparc.md.
>
> This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
> and make -k check, both with and without --target_board=unix{-m32}
> with no new failures.  Ok for mainline?
>
>
> 2023-05-10  Roger Sayle  <roger@nextmovesoftware.com>
>
> gcc/ChangeLog
>         * config/i386/i386.md (*concat<mode><dwi>3_1): Use preferred
>         [(const_int 0)] idiom, instead of [(clobber (const_int 0))].
>         (*concat<mode><dwi>3_2): Likewise.
>         (*concat<mode><dwi>3_3): Likewise.
>         (*concat<mode><dwi>3_4): Likewise.
>         (*concat<mode><dwi>3_5): Likewise.
>         (*concat<mode><dwi>3_6): Likewise.
>         (*concat<mode><dwi>3_7): Likewise.

OK, even as an obvious patch.

Thanks,
Uros.

>
>
> Thanks,
> Roger
> --
>

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 19:20 [x86_64 PATCH] Use [(const_int 0)] idiom consistently in i386.md Roger Sayle
2023-05-10 19:50 ` Uros Bizjak

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