https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113818
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:6c124873f5197ca8aac5acfada4b0e7fba49807f commit r14-8895-g6c124873f5197ca8aac5acfada4b0e7fba49807f Author: Jakub Jelinek <ja...@redhat.com> Date: Fri Feb 9 11:07:34 2024 +0100 lower-bitint: Fix up additions of EH edges [PR113818] Due to -fnon-call-exceptions the bitint lowering adds new EH edges in various places, so that the EH edge points from handling (e.g. load or store) of each of the limbs. The problem is that the EH edge destination as shown in the testcase can have some PHIs. If it is just a virtual PHI, no big deal, the pass uses TODO_update_ssa_only_virtuals, but if it has other PHIs, I think we need to copy the values from the preexisting corresponding EH edge (which is from the original stmt to the EH pad) to the newly added EH edge, so that the PHI arguments are the same rather than missing (which ICEs during checking at the end of the pass). This patch adds a function to do that and uses it whenever adding EH edges. 2024-02-09 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/113818 * gimple-lower-bitint.cc (add_eh_edge): New function. (bitint_large_huge::handle_load, bitint_large_huge::lower_mergeable_stmt, bitint_large_huge::lower_muldiv_stmt): Use it. * gcc.dg/bitint-89.c: New test.