public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
[not found] <bug-21643-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-08 20:55 ` pinskia at gcc dot gnu.org
2012-10-31 8:46 ` jakub at gcc dot gnu.org
2012-10-31 8:52 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-08 20:55 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
[not found] <bug-21643-4@http.gcc.gnu.org/bugzilla/>
2012-02-08 20:55 ` [Bug tree-optimization/21643] GCC fails to merge ranges in comparison pinskia at gcc dot gnu.org
@ 2012-10-31 8:46 ` jakub at gcc dot gnu.org
2012-10-31 8:52 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-31 8:46 UTC (permalink / raw)
To: gcc-bugs
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=gcc&view=rev&rev=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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
[not found] <bug-21643-4@http.gcc.gnu.org/bugzilla/>
2012-02-08 20:55 ` [Bug tree-optimization/21643] GCC fails to merge ranges in comparison pinskia at gcc dot gnu.org
2012-10-31 8:46 ` jakub at gcc dot gnu.org
@ 2012-10-31 8:52 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-31 8:52 UTC (permalink / raw)
To: gcc-bugs
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+.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
2005-05-18 12:32 [Bug rtl-optimization/21643] New: " dwmw2 at infradead dot org
2005-05-18 12:39 ` [Bug tree-optimization/21643] " pinskia at gcc dot gnu dot org
2005-05-18 17:21 ` trt at acm dot org
@ 2005-05-18 17:28 ` trt at acm dot org
2 siblings, 0 replies; 6+ messages in thread
From: trt at acm dot org @ 2005-05-18 17:28 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
2005-05-18 12:32 [Bug rtl-optimization/21643] New: " dwmw2 at infradead dot org
2005-05-18 12:39 ` [Bug tree-optimization/21643] " pinskia at gcc dot gnu dot org
@ 2005-05-18 17:21 ` trt at acm dot org
2005-05-18 17:28 ` trt at acm dot org
2 siblings, 0 replies; 6+ messages in thread
From: trt at acm dot org @ 2005-05-18 17:21 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/21643] GCC fails to merge ranges in comparison.
2005-05-18 12:32 [Bug rtl-optimization/21643] New: " dwmw2 at infradead dot org
@ 2005-05-18 12:39 ` pinskia at gcc dot gnu dot org
2005-05-18 17:21 ` trt at acm dot org
2005-05-18 17:28 ` trt at acm dot org
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-18 12:39 UTC (permalink / raw)
To: gcc-bugs
------- 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|0000-00-00 00:00:00 |2005-05-18 12:38:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21643
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-31 8:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-21643-4@http.gcc.gnu.org/bugzilla/>
2012-02-08 20:55 ` [Bug tree-optimization/21643] GCC fails to merge ranges in comparison pinskia at gcc dot gnu.org
2012-10-31 8:46 ` jakub at gcc dot gnu.org
2012-10-31 8:52 ` jakub at gcc dot gnu.org
2005-05-18 12:32 [Bug rtl-optimization/21643] New: " dwmw2 at infradead dot org
2005-05-18 12:39 ` [Bug tree-optimization/21643] " pinskia at gcc dot gnu dot org
2005-05-18 17:21 ` trt at acm dot org
2005-05-18 17:28 ` trt at acm dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).