From: H.J. Lu Date: Fri, 26 Jun 2026 21:22:21 +0000 (+0800) Subject: Replace the min size rtx with GEN_INT (min_size) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10f654cd90ffd58f91bf1ee8a0af762040346ab4;p=thirdparty%2Fgcc.git Replace the min size rtx with GEN_INT (min_size) commit cbc56384029c9224280b0a1018fb9502797f243d Author: H.J. Lu Date: Fri Jun 26 08:43:20 2026 +0800 determine_block_size: Set len_rtx to min size if min size == max size added + gcc_assert (min_size != max_size + || rtx_equal_p (ops[2].value, ops[6].value)); But the number of operands isn't fixed and may be less than 7. Replace the min size rtx with GEN_INT (min_size) to support different numbers of operands. PR middle-end/125977 * expr.cc (emit_block_move_via_pattern): Replace ops[6].value in assert with GEN_INT (min_size). Signed-off-by: H.J. Lu --- diff --git a/gcc/expr.cc b/gcc/expr.cc index 43931687d63..469c4d013b4 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -2321,7 +2321,7 @@ emit_block_move_via_pattern (rtx x, rtx y, rtx size, unsigned int align, create_fixed_operand (&ops[8], NULL); } gcc_assert (min_size != max_size - || rtx_equal_p (ops[2].value, ops[6].value)); + || rtx_equal_p (ops[2].value, GEN_INT (min_size))); if (maybe_expand_insn (code, nops, ops)) return true; } @@ -4048,7 +4048,7 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, create_fixed_operand (&ops[8], NULL); } gcc_assert (min_size != max_size - || rtx_equal_p (ops[1].value, ops[6].value)); + || rtx_equal_p (ops[1].value, GEN_INT (min_size))); if (maybe_expand_insn (code, nops, ops)) return true; }