https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125917
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:6523cf83a553a3ac9a0546370ddc98926575e440 commit r17-1752-g6523cf83a553a3ac9a0546370ddc98926575e440 Author: Andrew Pinski <[email protected]> Date: Sun Jun 21 11:22:09 2026 -0700 cselim: Just use gsi_insert_before instead of checking if it is the end [PR125917] This code dates before tuples so it used to do some tricks to try to insert at the begining of the basic block. Now post tuples, to insert at the begining of the basic block, you just need to use gsi_after_labels followed by gsi_insert_before. This changes to do just that and simplifies the code slightly. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/125917 gcc/ChangeLog: * tree-ssa-phiopt.cc (cond_store_replacement): Just call gsi_insert_before instead of checking gsi_end_p. (cond_if_else_store_replacement_1): Likewise. Signed-off-by: Andrew Pinski <[email protected]>
