tree-ssa-math-opts: Fix up gsi_remove order in match_uaddc_usubc [PR112430]
The following testcase ICEs, because the temp_stmts were removed in
wrong order, from the ones appearing earlier in the IL to the later ones,
so insert_debug_temps_for_defs can reintroduce dead SSA_NAMEs back into the
IL.
The following patch fixes that by removing them in the order they were
pushed into the vector, which is from later ones to earlier ones.
Additionally, I've noticed I forgot to call release_defs on the removed
stmts.
2023-11-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/112430
* tree-ssa-math-opts.cc (match_uaddc_usubc): Remove temp_stmts in the
order they were pushed rather than in reverse order. Call
release_defs after gsi_remove.