diff options
author | Jeevitha Palanisamy <jeevitha@linux.ibm.com> | 2023-07-05 23:46:15 -0500 |
---|---|---|
committer | Jeevitha Palanisamy <jeevitha@linux.ibm.com> | 2023-07-05 23:46:15 -0500 |
commit | 1669fad496ed6cc7ddea142e12af15e0b9f7f3b4 (patch) | |
tree | abd677120d9cbd66ed1759b71a1081d27a7da6d8 | |
parent | 7339e725b995912747c01c3ec80ce602512f45df (diff) | |
download | gcc-1669fad496ed6cc7ddea142e12af15e0b9f7f3b4.zip gcc-1669fad496ed6cc7ddea142e12af15e0b9f7f3b4.tar.gz gcc-1669fad496ed6cc7ddea142e12af15e0b9f7f3b4.tar.bz2 |
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 <jeevitha@linux.ibm.com>
gcc/
PR target/106907
* config/rs6000/rs6000.cc (rs6000_expand_vector_extract): Remove redundant
initialization of new_addr.
-rw-r--r-- | gcc/config/rs6000/rs6000.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 07c3a3d..44b448d 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -7694,12 +7694,11 @@ rs6000_expand_vector_extract (rtx target, rtx vec, rtx elt) { unsigned int ele_size = GET_MODE_SIZE (inner_mode); rtx num_ele_m1 = GEN_INT (GET_MODE_NUNITS (mode) - 1); - rtx new_addr = gen_reg_rtx (Pmode); elt = gen_rtx_AND (Pmode, elt, num_ele_m1); if (ele_size > 1) elt = gen_rtx_MULT (Pmode, elt, GEN_INT (ele_size)); - new_addr = gen_rtx_PLUS (Pmode, XEXP (mem, 0), elt); + rtx new_addr = gen_rtx_PLUS (Pmode, XEXP (mem, 0), elt); new_addr = change_address (mem, inner_mode, new_addr); emit_move_insn (target, new_addr); } |