]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bootstrap rtl-checking: Fix XVEC vs XVECEXP in postreload.cc
authorHans-Peter Nilsson <hp@axis.com>
Mon, 5 Jun 2023 23:49:22 +0000 (01:49 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Tue, 6 Jun 2023 02:47:05 +0000 (04:47 +0200)
PR bootstrap/110120
* postreload.cc (reload_cse_move2add, move2add_use_add2_insn): Use
XVECEXP, not XEXP, to access first item of a PARALLEL.

gcc/postreload.cc

index b479d4b921bac1dbf442b5864cf7fba23bea64ac..20e138b4fa8bf3ef52411e1632f5fb900193fa2e 100644 (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))