[x86_64] Use [(const_int 0)] idiom consistently in i386.md

Message ID 000001d98374$7971dad0$6c559070$@nextmovesoftware.com
State Accepted
Headers
Series [x86_64] Use [(const_int 0)] idiom consistently in i386.md |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Roger Sayle May 10, 2023, 7:20 p.m. UTC
  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
--
  

Comments

Uros Bizjak May 10, 2023, 7:50 p.m. UTC | #1
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
> --
>
  

Patch

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)