https://gcc.gnu.org/g:6f6409e8c789020b297393526737d0aeecd719ba
commit r16-9495-g6f6409e8c789020b297393526737d0aeecd719ba Author: Jakub Jelinek <[email protected]> Date: Thu Aug 6 21:31:31 2026 +0200 Revert "cfgexpand: Verify that partitions do not share a MEM_EXPR [PR126405]" This reverts commit 7f1cdcfbf7a837b2ad14ebe2df04b01a178119f6. Diff: --- gcc/cfgexpand.cc | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 39a7f541d50a..777bff0f82b2 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -2462,31 +2462,6 @@ stack_protect_return_slot_p () return false; } -/* Verify that partitions which claim to be the same object really are at the - same address. MEM_EXPR-based disambiguation identifies a location by a - MEM_EXPR base and an offset from it, so two stack slots carrying one - MEM_EXPR read as a single object, which lets an access to one be redirected - to the other. out-of-SSA keeps them apart, see the comment above - split_overlapping_partition_decls. */ - -static void -verify_partition_mem_exprs (void) -{ - hash_map<tree, rtx> slots; - for (unsigned i = 0; i < num_var_partitions (SA.map); i++) - { - rtx x = SA.partition_to_pseudo[i]; - if (!x || !MEM_P (x) || !MEM_EXPR (x)) - continue; - bool existed; - rtx &known = slots.get_or_insert (MEM_EXPR (x), &existed); - if (!existed) - known = x; - else - gcc_assert (rtx_equal_p (XEXP (known, 0), XEXP (x, 0))); - } -} - /* Expand all variables used in the function. */ static rtx_insn * @@ -7197,9 +7172,6 @@ pass_expand::execute (function *fun) adjust_one_expanded_partition_var (name); } - if (flag_checking) - verify_partition_mem_exprs (); - /* Clean up RTL of variables that straddle across multiple partitions, and check that the rtl of any PARM_DECLs that are not cleaned up is that of their default defs. */
