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.
---
 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 6a3bc99190d9e..ed20a231951a3 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))


-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

Reply via email to