https://gcc.gnu.org/g:8e6a25b01becf449d54154b7e83de5f4955cba37

commit r15-4998-g8e6a25b01becf449d54154b7e83de5f4955cba37
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Thu Nov 7 02:47:15 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 39702929fc01..57b7e4b62f29 100644
--- a/gcc/tree-ssa-ifcombine.cc
+++ b/gcc/tree-ssa-ifcombine.cc
@@ -130,7 +130,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))

Reply via email to