public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1559] bootstrap rtl-checking: Fix XVEC vs XVECEXP in postreload.cc
@ 2023-06-06 2:48 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-06-06 2:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9677cc7496ffe44c5b483658ce30361519576537
commit r14-1559-g9677cc7496ffe44c5b483658ce30361519576537
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Tue Jun 6 01:49:22 2023 +0200
bootstrap rtl-checking: Fix XVEC vs XVECEXP in postreload.cc
PR bootstrap/110120
* postreload.cc (reload_cse_move2add, move2add_use_add2_insn): Use
XVECEXP, not XEXP, to access first item of a PARALLEL.
Diff:
---
gcc/postreload.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/postreload.cc b/gcc/postreload.cc
index b479d4b921b..20e138b4fa8 100644
--- a/gcc/postreload.cc
+++ b/gcc/postreload.cc
@@ -1801,7 +1801,7 @@ move2add_use_add2_insn (scalar_int_mode mode, rtx reg, rtx sym, rtx off,
naked SET, or else its single_set is the first element
in a PARALLEL. */
rtx *setloc = GET_CODE (PATTERN (insn)) == PARALLEL
- ? &XEXP (PATTERN (insn), 0) : &PATTERN (insn);
+ ? &XVECEXP (PATTERN (insn), 0, 0) : &PATTERN (insn);
if (*setloc == set && costs_lt_p (&newcst, &oldcst, speed))
{
changed = validate_change (insn, setloc, new_set, 0);
@@ -2027,7 +2027,7 @@ reload_cse_move2add (rtx_insn *first)
costs_add_n_insns (&oldcst, 1);
rtx *setloc = GET_CODE (PATTERN (next)) == PARALLEL
- ? &XEXP (PATTERN (next), 0) : &PATTERN (next);
+ ? &XVECEXP (PATTERN (next), 0, 0) : &PATTERN (next);
if (*setloc == set
&& costs_lt_p (&newcst, &oldcst, speed)
&& have_add2_insn (reg, new_src))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-06 2:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 2:48 [gcc r14-1559] bootstrap rtl-checking: Fix XVEC vs XVECEXP in postreload.cc Hans-Peter Nilsson
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).