https://gcc.gnu.org/g:3b4493ab89310ea65af7017330d229630d4910f1
commit 3b4493ab89310ea65af7017330d229630d4910f1 Author: Alexandre Oliva <ol...@gnu.org> Date: Thu Nov 21 22:36:58 2024 -0300 pass NULL separatep in adjacent blocks Diff: --- gcc/gimple-fold.cc | 1 - gcc/tree-ssa-ifcombine.cc | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index fe7fcf471d43..b579f9789c9d 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -7867,7 +7867,6 @@ reuse_split_load (tree /* in[0] out[1] */ ln_arg[2], single expression, even if it is a compound condition. This must only be done if LHS and RHS are adjacent, without intervening conditions, and the combined condition is to replace RHS, while LHS is dropped altogether. - ??? This possibility is curently unused. Otherwise, SEPARATEP must be a non-NULL pointer to a NULL_TREE, that may be replaced by a part of the compound condition that could replace RHS, while diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc index 96639f428ca0..6cb2edeb66eb 100644 --- a/gcc/tree-ssa-ifcombine.cc +++ b/gcc/tree-ssa-ifcombine.cc @@ -982,7 +982,8 @@ ifcombine_ifandif (basic_block inner_cond_bb, bool inner_inv, inner_cond_code, gimple_cond_lhs (inner_cond), gimple_cond_rhs (inner_cond), - &ts)))) + single_pred (inner_cond_bb) != outer_cond_bb + ? &ts : 0)))) { /* Only combine conditions in this fallback case if the blocks are neighbors. */