https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90020
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- For the RTL issue there's compute_hash_table_work (struct gcse_hash_table_d *table) { ... /* First pass over the instructions records information used to determine when registers and memory are first and last set. */ FOR_BB_INSNS (current_bb, insn) { if (!NONDEBUG_INSN_P (insn)) continue; if (CALL_P (insn)) { hard_reg_set_iterator hrsi; EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi) record_last_reg_set_info (insn, regno); if (! RTL_CONST_OR_PURE_CALL_P (insn)) record_last_mem_set_info (insn); which eventually initializes blocks_with_calls which prunes transp. But the calls in question are marked PURE but also RTL_LOOPING_CONST_OR_PURE_CALL_P. So the obvious thing for the above is to still mark the block for RTL_LOOPING_CONST_OR_PURE_CALL_P. Testing overall patch.