From c82d157a5d6f77c0ae3b4f8e1eadad16ed60df27 Mon Sep 17 00:00:00 2001 From: sandra Date: Tue, 8 Jun 2010 18:15:53 +0000 Subject: 2010-06-08 Sandra Loosemore PR tree-optimization/39874 PR middle-end/28685 gcc/ * gimple.h (maybe_fold_and_comparisons, maybe_fold_or_comparisons): Declare. * gimple-fold.c (canonicalize_bool, same_bool_comparison_p, same_bool_result_p): New. (and_var_with_comparison, and_var_with_comparison_1, and_comparisons_1, and_comparisons, maybe_fold_and_comparisons): New. (or_var_with_comparison, or_var_with_comparison_1, or_comparisons_1, or_comparisons, maybe_fold_or_comparisons): New. * tree-ssa-reassoc.c (eliminate_redundant_comparison): Use maybe_fold_and_comparisons or maybe_fold_or_comparisons instead of combine_comparisons. * tree-ssa-ifcombine.c (ifcombine_ifandif, ifcombine_iforif): Likewise. gcc/testsuite/ * gcc.dg/pr39874.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160445 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gimple.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/gimple.h') diff --git a/gcc/gimple.h b/gcc/gimple.h index d847e886997..c91ca49591b 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -4812,6 +4812,9 @@ tree maybe_fold_offset_to_address (location_t, tree, tree, tree); tree maybe_fold_stmt_addition (location_t, tree, tree, tree); tree get_symbol_constant_value (tree); bool may_propagate_address_into_dereference (tree, tree); - +extern tree maybe_fold_and_comparisons (enum tree_code, tree, tree, + enum tree_code, tree, tree); +extern tree maybe_fold_or_comparisons (enum tree_code, tree, tree, + enum tree_code, tree, tree); #endif /* GCC_GIMPLE_H */ -- cgit v1.2.1