From 5d2a9da9a7f7c19761dfe93849ac60fdb25cf7be Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Wed, 30 Oct 2013 04:03:41 +0000 Subject: tree-ssa-ifcombine.c: Include rtl.h and tm_p.h. 2013-10-29 Andrew Pinski * tree-ssa-ifcombine.c: Include rtl.h and tm_p.h. (ifcombine_ifandif): Handle cases where maybe_fold_and_comparisons fails, combining the branches anyways. (tree_ssa_ifcombine): Inverse the order of the basic block walk, increases the number of combinings. * gimple.h (gsi_start_nondebug_after_labels_bb): New function. 2013-10-29 Andrew Pinski Zhenqiang Chen * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: New test case. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: New test case. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: New test case. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: New test case. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: New test case. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: New test case. * gcc.dg/tree-ssa/phi-opt-9.c: Use a function call to prevent conditional move to be used. * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Remove. Co-Authored-By: Zhenqiang Chen From-SVN: r204194 --- gcc/gimple.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gcc/gimple.h') diff --git a/gcc/gimple.h b/gcc/gimple.h index e34411d..b0fb861 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -5533,6 +5533,20 @@ gsi_start_nondebug_bb (basic_block bb) return i; } +/* Return a new iterator pointing to the first non-debug non-label statement in + basic block BB. */ + +static inline gimple_stmt_iterator +gsi_start_nondebug_after_labels_bb (basic_block bb) +{ + gimple_stmt_iterator i = gsi_after_labels (bb); + + if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i))) + gsi_next_nondebug (&i); + + return i; +} + /* Return a new iterator pointing to the last non-debug statement in basic block BB. */ -- cgit v1.1