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.
This commit is contained in:
Hans-Peter Nilsson 2023-06-06 01:49:22 +02:00 committed by Hans-Peter Nilsson
parent d1344c4180
commit 9677cc7496

View file

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