https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
Bug 28685 depends on bug 15459, which changed state.
Bug 15459 Summary: [meta-bug] there should be a tree combiner like the rtl one
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15459
What|Removed |Added
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
Uros Bizjak changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #21 from Uros Bizjak 2012-04-22 12:45:17
UTC ---
(In reply to comment #17)
> The only one which is not fixed is comment #4
This testcase is fixed with patch at [1].
[1] http://gcc.gnu.org/ml/gcc-patches/2012-02/msg00295.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #20 from Uros Bizjak 2012-04-22 12:42:07
UTC ---
(In reply to comment #19)
> int test (int a, int b)
> {
> int lt = a + b < 0;
> int eq = a + b == 0;
> if (lt)
> return 1;
> return eq;
> }
Actually, here ce1 pass steps o
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #19 from Uros Bizjak 2012-02-06 21:36:01
UTC ---
(In reply to comment #4)
> Another similar, but yet different case:
Yet another similar test:
int test (int a, int b)
{
int lt = a + b < 0;
int eq = a + b == 0;
if (lt)
retu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
Uros Bizjak changed:
What|Removed |Added
Status|NEW |ASSIGNED
Target Milestone|---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed|2008-04-30 15:12:57 |2012-01-11
--- Comment #17 from Andrew Pi
--- Comment #16 from sandra at gcc dot gnu dot org 2010-06-08 18:16 ---
Subject: Bug 28685
Author: sandra
Date: Tue Jun 8 18:15:53 2010
New Revision: 160445
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160445
Log:
2010-06-08 Sandra Loosemore
PR tree-optimization/3
--- Comment #15 from sandra at codesourcery dot com 2010-06-01 02:24
---
Proposed patch for PR 39874/comment #5 posted here:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg1.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #14 from rguenther at suse dot de 2010-05-25 08:11 ---
Subject: Re: Multiple comparisons are not simplified
On Mon, 24 May 2010, sandra at codesourcery dot com wrote:
> --- Comment #13 from sandra at codesourcery dot com 2010-05-24 13:21
> ---
> I'm working on a
--- Comment #13 from sandra at codesourcery dot com 2010-05-24 13:21
---
I'm working on a patch that fixes the test case in comment #5 (originally filed
as PR 39874) and some other test cases by improving the comparison combination
logic in both tree-ssa-ifcombine and tree-ssa-reassoc.
--- Comment #12 from sandra at gcc dot gnu dot org 2010-05-08 15:54 ---
Subject: Bug 28685
Author: sandra
Date: Sat May 8 15:53:59 2010
New Revision: 159189
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159189
Log:
2010-05-08 Sandra Loosemore
PR middle-end/28685
--- Comment #11 from sandra at codesourcery dot com 2010-05-08 03:43
---
I've posted the patch to fix the first testcase here:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00564.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #10 from sandra at codesourcery dot com 2010-05-07 02:32
---
I've been working on a patch that fixes the original reported problem by adding
a little logic to tree-ssa-reassoc.c to make it look for places where it can
use combine_comparisons. Note that this test case does n
--- Comment #9 from ubizjak at gmail dot com 2009-09-17 10:25 ---
*** Bug 28691 has been marked as a duplicate of this bug. ***
--
ubizjak at gmail dot com changed:
What|Removed |Added
---
--- Comment #8 from rguenth at gcc dot gnu dot org 2009-06-24 09:15 ---
:P
I am currently not working on a fix for this (heh, people may have noticed
that ...). My idea was to build an on-the-side CFG for this and use that
in tree-ssa-ifcombine.c - I just never came around implementing
--- Comment #7 from steven at gcc dot gnu dot org 2009-06-24 07:49 ---
How are things progressing with a fix for this, Richi? :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #6 from rguenth at gcc dot gnu dot org 2009-04-24 09:24 ---
*** Bug 39874 has been marked as a duplicate of this bug. ***
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
---
--- Comment #5 from rguenth at gcc dot gnu dot org 2009-04-24 09:24 ---
Another case:
void func();
void test(char *signature)
{
char ch = signature[0];
if (ch == 15 || ch == 3)
{
if (ch == 15) func();
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28685
--- Comment #4 from rguenth at gcc dot gnu dot org 2008-10-12 20:45 ---
Another similar, but yet different case:
int test(int a, int b)
{
int lt = a < b;
int eq = a == b;
if (lt)
return 1;
return eq;
}
this is what we "optimize" it to:
test (int a, int b)
{
int eq;
:
--- Comment #3 from ubizjak at gmail dot com 2008-09-06 16:33 ---
gcc (4.4.0 20080906) still generates:
cmpl%esi, %edi
sete%al
cmpl%esi, %edi
setl%dl
orl %edx, %eax
movzbl %al, %eax
ret
--
http://gcc.gnu.o
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-04-30 15:12 ---
A third variant is optimized by the ifcombine pass:
int test__(int a, int b)
{
if (a < b)
return 1;
if (a == b)
return 1;
return 0;
}
in principle ifcombine could handle flow-less combining as well.
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-10 18:18 ---
This all comes down to a tree combiner.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
-
23 matches
Mail list logo