[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643 Gilbie Rivas changed: What|Removed |Added CC||rivasgilbie121 at gmail dot com --- Comment #8 from Gilbie Rivas --- Lovely article - one of the best things I've recently read, and by far the most useful. That helped me a lot. I would like to share with you a great service to merge some files online. BTW, there is an online service through which you can merge any PDF files, the link is here http://www.altomerge.com/; >altomerge.com.
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org 2012-10-31 08:45:35 UTC --- Author: jakub Date: Wed Oct 31 08:45:27 2012 New Revision: 193028 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193028 Log: PR tree-optimization/19105 PR tree-optimization/21643 PR tree-optimization/46309 * tree-ssa-reassoc.c (init_range_entry): Add STMT argument and use it if EXP is NULL. (update_range_test): Handle OPCODE equal to ERROR_MARK and oe-op NULL. (optimize_range_tests): Likewise. (final_range_test_p, suitable_cond_bb, no_side_effect_bb, get_ops, maybe_optimize_range_tests): New functions. (reassociate_bb): Call maybe_optimize_range_tests if last stmt of bb is GIMPLE_COND that hasn't been visited yet. * gcc.dg/pr19105.c: New test. * gcc.dg/pr21643.c: New test. * gcc.dg/pr46309-2.c: New test. * gcc.c-torture/execute/pr46309.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/execute/pr46309.c trunk/gcc/testsuite/gcc.dg/pr19105.c trunk/gcc/testsuite/gcc.dg/pr21643.c trunk/gcc/testsuite/gcc.dg/pr46309-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-reassoc.c
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED CC||jakub at gcc dot gnu.org Resolution||FIXED Target Milestone|--- |4.8.0 --- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2012-10-31 08:51:45 UTC --- Fixed for 4.8+.
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Depends on||46309 --- Comment #5 from Andrew Pinski pinskia at gcc dot gnu.org 2012-02-08 20:53:57 UTC --- Related to PR 46309.
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-18 12:38 --- Confirmed. -- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Severity|normal |enhancement Status|UNCONFIRMED |NEW Component|rtl-optimization|tree-optimization Ever Confirmed||1 Keywords||missed-optimization Last reconfirmed|-00-00 00:00:00 |2005-05-18 12:38:44 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
--- Additional Comments From trt at acm dot org 2005-05-18 17:21 --- This is because fold-const.c only does ad-hoc re-association. Here is an example for fold_truthop (approx line 8805) /* Check for the possibility of merging component references. If our lhs is another similar operation, try to merge its rhs with our rhs. Then try to merge our lhs and rhs. */ if (TREE_CODE (arg0) == code 0 != (tem = fold_truthop (code, type, TREE_OPERAND (arg0, 1), arg1))) return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem); A similar hack could be done for fold_range_test. (I wrote a helper fold_assoc (f, x, code, type, op1, op2) that does this in a more general way, but it in turn needed `find_assoc_p' and `commutes_p' functions, and handling EXPR_MINUS was onerous. It might be too slow for general use. Basically, it needs a fast way to check for common subexpressions to avoid pointless recursions.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643
[Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
--- Additional Comments From trt at acm dot org 2005-05-18 17:28 --- Here is a equivalent case that gcc also misses (but beyond scope of fold-const.c). By the way, since there is a missing final return, can't gcc just simplify all three functions into return 1; :-) int fish3(unsigned char c) { if (c =='') return 1; if (c == 0x20) return 1; if (c 0x20) return 1; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643