[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2024-02-27 Thread jeevitha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

Jeevitha  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #11 from Jeevitha  ---
Fixed

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-10-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #10 from CVS Commits  ---
The master branch has been updated by jeevitha :

https://gcc.gnu.org/g:36a52cdc23383e51359630e566b62fa62011428d

commit r14-5006-g36a52cdc23383e51359630e566b62fa62011428d
Author: Jeevitha 
Date:   Mon Oct 30 04:07:07 2023 -0500

rs6000: Change bitwise xor to an equality operator [PR106907]

PR106907 has a few warnings spotted from cppcheck. These warnings
are related to the need of precedence clarification. Instead of using xor,
it has been changed to equality check, which achieves the same result.
Additionally, comment indentation has been fixed.

2023-10-11  Jeevitha Palanisamy  

gcc/
PR target/106907
* config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Change
bitwise
xor to an equality and fix comment indentation.

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-07-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #9 from CVS Commits  ---
The master branch has been updated by jeevitha :

https://gcc.gnu.org/g:1669fad496ed6cc7ddea142e12af15e0b9f7f3b4

commit r14-2336-g1669fad496ed6cc7ddea142e12af15e0b9f7f3b4
Author: Jeevitha Palanisamy 
Date:   Wed Jul 5 23:46:15 2023 -0500

rs6000: Remove redundant initialization [PR106907]

PR106907 has few warnings spotted from cppcheck. In that addressing
redundant initialization issue. Here the initialized value of 'new_addr'
was overwritten before it was read. Updated the source by removing the
unnecessary initialization of 'new_addr'.

2023-07-06  Jeevitha Palanisamy  

gcc/
PR target/106907
* config/rs6000/rs6000.cc (rs6000_expand_vector_extract): Remove
redundant
initialization of new_addr.

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-07-05 Thread jeevitha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

Jeevitha  changed:

   What|Removed |Added

 CC||linkw at gcc dot gnu.org

--- Comment #8 from Jeevitha  ---
Static analyser cppcheck says:

gcc/config/rs6000/rs6000.cc:7668:16: style: Redundant initialization for
'new_addr'. The initialized value is overwritten before it is read.
[redundantInitialization]
  new_addr = gen_rtx_PLUS (Pmode, XEXP (mem, 0), elt);
   ^
rs6000.cc:7663:20: note: new_addr is initialized
  rtx new_addr = gen_reg_rtx (Pmode);
   ^
rs6000.cc:7668:16: note: new_addr is overwritten
  new_addr = gen_rtx_PLUS (Pmode, XEXP (mem, 0), elt);
   ^

In above issue new_addr was initialized at line no : 7663 which was overwritten
before it reads at line no : 7668

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-06-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #7 from CVS Commits  ---
The releases/gcc-12 branch has been updated by jeevitha :

https://gcc.gnu.org/g:3b09a5453114fee10b0f0984793ce968503dbea7

commit r12-9689-g3b09a5453114fee10b0f0984793ce968503dbea7
Author: Jeevitha Palanisamy 
Date:   Tue Jun 6 06:19:02 2023 -0500

rs6000: Remove duplicate expression [PR106907]

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-06  Jeevitha Palanisamy  

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

(cherry picked from commit c4deccd44655c5d748dfed200a37f2b678c32fe8)

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-06-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #6 from CVS Commits  ---
The releases/gcc-13 branch has been updated by jeevitha :

https://gcc.gnu.org/g:dda4745eb1c9b063c6004baef54aa4cec97edf3d

commit r13-7426-gdda4745eb1c9b063c6004baef54aa4cec97edf3d
Author: Jeevitha Palanisamy 
Date:   Tue Jun 6 06:19:02 2023 -0500

rs6000: Remove duplicate expression [PR106907]

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-06  Jeevitha Palanisamy  

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

(cherry picked from commit c4deccd44655c5d748dfed200a37f2b678c32fe8)

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-06-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #5 from CVS Commits  ---
The master branch has been updated by jeevitha :

https://gcc.gnu.org/g:c4deccd44655c5d748dfed200a37f2b678c32fe8

commit r14-1567-gc4deccd44655c5d748dfed200a37f2b678c32fe8
Author: Jeevitha Palanisamy 
Date:   Tue Jun 6 06:19:02 2023 -0500

rs6000: Remove duplicate expression [PR106907]

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-06  Jeevitha Palanisamy  

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

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2023-05-30 Thread jeevitha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

Jeevitha  changed:

   What|Removed |Added

 CC||jeevitha at gcc dot gnu.org

--- Comment #4 from Jeevitha  ---
(In reply to Andreas Schwab from comment #3)
> Should probably be written as swapped != !BYTES_BIG_ENDIAN.

I bootstrapped and regtest there is no regression with this change.

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2022-09-12 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #3 from Andreas Schwab  ---
Should probably be written as swapped != !BYTES_BIG_ENDIAN.

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2022-09-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #2 from David Binderman  ---
In the same file rs6000.cc, cppcheck produces:

gcc/config/rs6000/rs6000.cc:28477:8: style: Same expression on both sides of
'&&'. [duplicateExpression]

Source code is

  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]);

[Bug target/106907] gcc/config/rs6000/rs6000.cc:23155: strange expression ?

2022-09-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106907

--- Comment #1 from David Binderman  ---
Wrong source code. It should be:

 if (swapped ^ !BYTES_BIG_ENDIAN
  && icode != CODE_FOR_vsx_xxpermdi_v16qi)

That looks like it could benefit from some ( and ).

The source code I did mention produces this message:

gcc/config/gcn/gcn.cc:5563:5: style: Clarify calculation precedence for '&' and
'?'. [clarifyCalculation]

So two bugs reports in one.