[Bug rtl-optimization/116053] [14 Regression] during RTL pass: cprop_hardreg ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -O1 -finstrument-functions -fno-forward-propagate -fno-delete-dead-exceptions -fnon-call-exceptions
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 17 13:41:31 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116053
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:99e3c5388a05bd14309d4b2d52d93caffa4f7ac5
commit r14-12676-g99e3c5388a05bd14309d4b2d52d93caffa4f7ac5
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Tue Feb 17 21:42:30 2026 -0800
cprop_hardreg: Use delete_insn_and_edges instead of delete_insn [PR116053]
So delete_insn_and_edges was added explicitly to solve the problem of
having
to cleanup the dead eh edges when a load becomes dead (non-trapping in this
case).
This moves the one call to delete_insn in cprop_hardreg over to use
delete_insn_and_edges
to fix this case.
Basically we copyprop the sp register into a memory load. This memory load
is normally
dead way before but with non-call eh and -fno-delete-dead-exceptions, it is
alive until
cprop_hardreg. After thie copy prop of the sp register into the memory
address of the load,
the load becomes non-trapping and is allowed to be deleted. Except we don't
remove the eh edges
because cprop_hardreg only called delete_insn. So this updates the call to
delete_insn_and_edges
which removes the eh edges.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR rtl-optimization/116053
gcc/ChangeLog:
* regcprop.cc (copyprop_hardreg_forward_1): Use
delete_insn_and_edges
instead of delete_insn.
gcc/testsuite/ChangeLog:
* gcc.dg/pr116053-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
(cherry picked from commit 6f777c34c9f221a50d0fc22b70b1cf7dd1fd9101)
More information about the Gcc-bugs
mailing list