public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Remove duplicate expression [PR106907]
@ 2023-06-05  6:41 P Jeevitha
  2023-06-05  9:22 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: P Jeevitha @ 2023-06-05  6:41 UTC (permalink / raw)
  To: gcc-patches, bergner, segher

PR106907 has few warnings spotted from cppcheck. In that addressing duplicate
expression issue here. Here the same expression is used twice in logical
AND(&&) operation which result in same result so removing that.

2023-06-05  Jeevitha Palanisamy  <jeevitha@linux.ibm.com>

gcc/
	PR target/106907
	* config/rs6000/rs6000.cc (vec_const_128bit_to_bytes): Remove
	duplicate expression.


diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 42f49e4a56b..d197c3f3289 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -28784,7 +28784,6 @@ vec_const_128bit_to_bytes (rtx op,
 
   info->all_words_same
     = (info->words[0] == info->words[1]
-       && info->words[0] == info->words[1]
        && info->words[0] == info->words[2]
        && info->words[0] == info->words[3]);
 



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

* Re: [PATCH] rs6000: Remove duplicate expression [PR106907]
  2023-06-05  6:41 [PATCH] rs6000: Remove duplicate expression [PR106907] P Jeevitha
@ 2023-06-05  9:22 ` Segher Boessenkool
  2023-06-06 15:56   ` P Jeevitha
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2023-06-05  9:22 UTC (permalink / raw)
  To: P Jeevitha; +Cc: gcc-patches, bergner

Hi!

On Mon, Jun 05, 2023 at 12:11:42PM +0530, P Jeevitha wrote:
> PR106907 has few warnings spotted from cppcheck. In that addressing duplicate
> expression issue here. Here the same expression is used twice in logical
> AND(&&) operation which result in same result so removing that.
> 
> 2023-06-05  Jeevitha Palanisamy  <jeevitha@linux.ibm.com>
> 
> gcc/
> 	PR target/106907
> 	* config/rs6000/rs6000.cc (vec_const_128bit_to_bytes): Remove
> 	duplicate expression.
> 
> 
> diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
> index 42f49e4a56b..d197c3f3289 100644
> --- a/gcc/config/rs6000/rs6000.cc
> +++ b/gcc/config/rs6000/rs6000.cc
> @@ -28784,7 +28784,6 @@ vec_const_128bit_to_bytes (rtx op,
>  
>    info->all_words_same
>      = (info->words[0] == info->words[1]
> -       && info->words[0] == info->words[1]
>         && info->words[0] == info->words[2]
>         && info->words[0] == info->words[3]);

Thanks!  Okay for trunk.  Also okay for all backports, no need to wait
if unexpected problems in trunk show up.  But still, backport to 13
first, then 12, then 11, only stop when it stops applying (or there are
no open release branches left) :-)


Segher

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

* Re: [PATCH] rs6000: Remove duplicate expression [PR106907]
  2023-06-05  9:22 ` Segher Boessenkool
@ 2023-06-06 15:56   ` P Jeevitha
  0 siblings, 0 replies; 3+ messages in thread
From: P Jeevitha @ 2023-06-06 15:56 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches, bergner

Thanks for reviewing Segher. Will work on backports as well :).


Jeevitha

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

end of thread, other threads:[~2023-06-06 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05  6:41 [PATCH] rs6000: Remove duplicate expression [PR106907] P Jeevitha
2023-06-05  9:22 ` Segher Boessenkool
2023-06-06 15:56   ` P Jeevitha

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