https://gcc.gnu.org/g:5a40cc2b90452e5307493fc58f6730efd9981a7a
commit 5a40cc2b90452e5307493fc58f6730efd9981a7a Author: Alexandre Oliva <ol...@adacore.com> Date: Thu Oct 24 05:25:21 2024 -0300 allow vuses in ifcombine blocks Disallowing vuses in blocks for ifcombine is too strict, and it prevents usefully moving fold_truth_andor into ifcombine. That tree-level folder has long ifcombined loads, absent other relevant side effects. for gcc/ChangeLog * tree-ssa-ifcombine.c (bb_no_side_effects_p): Allow vuses, but not vdefs. Diff: --- gcc/tree-ssa-ifcombine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc index 6a3bc99190d9..ed20a231951a 100644 --- a/gcc/tree-ssa-ifcombine.cc +++ b/gcc/tree-ssa-ifcombine.cc @@ -129,7 +129,7 @@ bb_no_side_effects_p (basic_block bb) enum tree_code rhs_code; if (gimple_has_side_effects (stmt) || gimple_could_trap_p (stmt) - || gimple_vuse (stmt) + || gimple_vdef (stmt) /* We need to rewrite stmts with undefined overflow to use unsigned arithmetic but cannot do so for signed division. */ || ((ass = dyn_cast <gassign *> (stmt))