public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
@ 2003-06-07 20:03 ` pinskia@physics.uc.edu
2003-07-08 0:50 ` pinskia at physics dot uc dot edu
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-07 20:03 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|0000-00-00 00:00:00 |2003-06-07 20:03:47
date| |
------- Additional Comments From pinskia@physics.uc.edu 2003-06-07 20:03 -------
Still happens on the mainline (20030607).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
2003-06-07 20:03 ` [Bug optimization/8681] Generates unneeded test pinskia@physics.uc.edu
@ 2003-07-08 0:50 ` pinskia at physics dot uc dot edu
2003-12-26 3:45 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-08 0:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-06-07 20:03:47 |2003-07-08 00:50:26
date| |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-08 00:50 -------
It still happens on the mainline (20030707) and it also happens on the tree-ssa branch.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
2003-06-07 20:03 ` [Bug optimization/8681] Generates unneeded test pinskia@physics.uc.edu
2003-07-08 0:50 ` pinskia at physics dot uc dot edu
@ 2003-12-26 3:45 ` pinskia at gcc dot gnu dot org
2004-03-03 16:50 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26 3:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Last reconfirmed|2003-11-23 08:02:00 |2003-12-26 03:34:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (2 preceding siblings ...)
2003-12-26 3:45 ` pinskia at gcc dot gnu dot org
@ 2004-03-03 16:50 ` pinskia at gcc dot gnu dot org
2004-05-24 5:54 ` [Bug tree-optimization/8681] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-03 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-03 16:50 -------
This is semi fixed on the tree-ssa:
sum (p)
{
int result;
int i;
<bb 0>:
result = 0;
i = 0;
goto <bb 4> (<L5>);
<L0>:;
if (i < 0) goto <L1>; else goto <L2>;
<L1>:;
result = 0;
<L2>:;
<L5>:;
result = *((int *)((unsigned int)i * 4) + p) + result;
i = i + 1;
if (i <= 9999) goto <L0>; else goto <L4>;
<L4>:;
return result;
}
There is still a comparision but no longer in the asm (meaning that the RTL optimizers
optimize it away):
_sum:
li r0,10001
mr r11,r3
li r9,0
li r3,0
mtctr r0
slwi r5,r9,2
lwzx r2,r5,r11
addi r9,r9,1
nor r4,r9,r9
srawi r0,r4,31
add r3,r3,r2
bdz L12
L8:
slwi r5,r9,2
addi r9,r9,1
lwzx r2,r5,r11
and r3,r3,r0
nor r4,r9,r9
srawi r0,r4,31
add r3,r3,r2
bdnz L8
L12:
blr
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-12-26 03:34:20 |2004-03-03 16:50:28
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (3 preceding siblings ...)
2004-03-03 16:50 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 5:54 ` pinskia at gcc dot gnu dot org
2005-01-22 18:14 ` kazu at cs dot umass dot edu
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 5:54 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |tree-optimization
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (4 preceding siblings ...)
2004-05-24 5:54 ` [Bug tree-optimization/8681] " pinskia at gcc dot gnu dot org
@ 2005-01-22 18:14 ` kazu at cs dot umass dot edu
2005-04-24 17:56 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-01-22 18:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-01-22 18:14 -------
Still not fixed at tree level.
sum (p)
{
unsigned int D.1166;
unsigned int D.1161;
int result;
int i;
<bb 0>:
result = 0;
i = 0;
goto <bb 3> (<L10>);
<L0>:;
if (i < 0) goto <L11>; else goto <L10>;
<L11>:;
result = 0;
<L10>:;
D.1161 = (unsigned int) i;
result = result + *(p + (int *) D.1161 * 4B);
D.1166 = D.1161 + 1;
i = (int) D.1166;
if (D.1166 != 10000) goto <L0>; else goto <L4>;
<L4>:;
return result;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (5 preceding siblings ...)
2005-01-22 18:14 ` kazu at cs dot umass dot edu
@ 2005-04-24 17:56 ` pinskia at gcc dot gnu dot org
2005-04-24 18:06 ` Diego Novillo
2005-04-24 18:07 ` dnovillo at redhat dot com
` (5 subsequent siblings)
12 siblings, 1 reply; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-24 17:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-24 17:56 -------
i_15: [1, 2147483647]
i_16: [0, 2147483647]
i_20: VARYING
# i_20 = PHI <i_15(3), 0(0)>;
Looks like VRP does not understand PHI functions or it just gives up too often.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |18373
nThis| |
Last reconfirmed|2005-01-13 18:59:31 |2005-04-24 17:56:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bug tree-optimization/8681] Generates unneeded test
2005-04-24 17:56 ` pinskia at gcc dot gnu dot org
@ 2005-04-24 18:06 ` Diego Novillo
2005-04-24 18:10 ` Andrew Pinski
0 siblings, 1 reply; 15+ messages in thread
From: Diego Novillo @ 2005-04-24 18:06 UTC (permalink / raw)
To: pinskia at gcc dot gnu dot org; +Cc: gcc-bugs
On Sun, Apr 24, 2005 at 05:56:50PM -0000, pinskia at gcc dot gnu dot org wrote:
>
> i_15: [1, 2147483647]
> i_16: [0, 2147483647]
> i_20: VARYING
>
> # i_20 = PHI <i_15(3), 0(0)>;
>
>
> Looks like VRP does not understand PHI functions or it just gives up too often.
>
i_15 and 0 have a non-empty intersection and so vrp_meet returns
VARYING. VRP does not handle multiple ranges, but in this case
it should not be hard to merge the two adjacent ranges [1, +INF]
and [0, 0].
What is the type of 'i'? If it's unsigned, then we would be
wasting our time.
Diego.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (6 preceding siblings ...)
2005-04-24 17:56 ` pinskia at gcc dot gnu dot org
@ 2005-04-24 18:07 ` dnovillo at redhat dot com
2005-04-24 18:10 ` pinskia at physics dot uc dot edu
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: dnovillo at redhat dot com @ 2005-04-24 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at redhat dot com 2005-04-24 18:07 -------
Subject: Re: Generates unneeded test
On Sun, Apr 24, 2005 at 05:56:50PM -0000, pinskia at gcc dot gnu dot org wrote:
>
> i_15: [1, 2147483647]
> i_16: [0, 2147483647]
> i_20: VARYING
>
> # i_20 = PHI <i_15(3), 0(0)>;
>
>
> Looks like VRP does not understand PHI functions or it just gives up too often.
>
i_15 and 0 have a non-empty intersection and so vrp_meet returns
VARYING. VRP does not handle multiple ranges, but in this case
it should not be hard to merge the two adjacent ranges [1, +INF]
and [0, 0].
What is the type of 'i'? If it's unsigned, then we would be
wasting our time.
Diego.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (7 preceding siblings ...)
2005-04-24 18:07 ` dnovillo at redhat dot com
@ 2005-04-24 18:10 ` pinskia at physics dot uc dot edu
2005-05-10 5:37 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at physics dot uc dot edu @ 2005-04-24 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at physics dot uc dot edu 2005-04-24 18:10 -------
Subject: Re: Generates unneeded test
On Apr 24, 2005, at 2:06 PM, Diego Novillo wrote:
> What is the type of 'i'? If it's unsigned, then we would be
> wasting our time.
It is signed, otherwise "i < 0" will always be true and the conditional
would have gotten rid of already.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bug tree-optimization/8681] Generates unneeded test
2005-04-24 18:06 ` Diego Novillo
@ 2005-04-24 18:10 ` Andrew Pinski
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Pinski @ 2005-04-24 18:10 UTC (permalink / raw)
To: Diego Novillo; +Cc: gcc-bugs, pinskia at gcc dot gnu dot org
On Apr 24, 2005, at 2:06 PM, Diego Novillo wrote:
> What is the type of 'i'? If it's unsigned, then we would be
> wasting our time.
It is signed, otherwise "i < 0" will always be true and the conditional
would have gotten rid of already.
-- Pinski
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (8 preceding siblings ...)
2005-04-24 18:10 ` pinskia at physics dot uc dot edu
@ 2005-05-10 5:37 ` kazu at cs dot umass dot edu
2005-06-02 18:38 ` dnovillo at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-05-10 5:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-05-10 05:37 -------
The same patch for PR 21458 would work.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kazu at cs dot umass dot edu
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (9 preceding siblings ...)
2005-05-10 5:37 ` kazu at cs dot umass dot edu
@ 2005-06-02 18:38 ` dnovillo at gcc dot gnu dot org
2005-06-02 18:56 ` pinskia at gcc dot gnu dot org
2005-09-10 18:11 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-06-02 18:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2005-06-02 18:37 -------
Fixed. Likely with http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00127.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (10 preceding siblings ...)
2005-06-02 18:38 ` dnovillo at gcc dot gnu dot org
@ 2005-06-02 18:56 ` pinskia at gcc dot gnu dot org
2005-09-10 18:11 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-02 18:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/8681] Generates unneeded test
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
` (11 preceding siblings ...)
2005-06-02 18:56 ` pinskia at gcc dot gnu dot org
@ 2005-09-10 18:11 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-10 18:11 UTC (permalink / raw)
To: gcc-bugs
--
Bug 8681 depends on bug 18373, which changed state.
Bug 18373 Summary: [meta-bug] VRP Value Range Propagation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18373
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8681
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-09-10 18:10 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20021122094603.8681.rf13@inf.tu-dresden.de>
2003-06-07 20:03 ` [Bug optimization/8681] Generates unneeded test pinskia@physics.uc.edu
2003-07-08 0:50 ` pinskia at physics dot uc dot edu
2003-12-26 3:45 ` pinskia at gcc dot gnu dot org
2004-03-03 16:50 ` pinskia at gcc dot gnu dot org
2004-05-24 5:54 ` [Bug tree-optimization/8681] " pinskia at gcc dot gnu dot org
2005-01-22 18:14 ` kazu at cs dot umass dot edu
2005-04-24 17:56 ` pinskia at gcc dot gnu dot org
2005-04-24 18:06 ` Diego Novillo
2005-04-24 18:10 ` Andrew Pinski
2005-04-24 18:07 ` dnovillo at redhat dot com
2005-04-24 18:10 ` pinskia at physics dot uc dot edu
2005-05-10 5:37 ` kazu at cs dot umass dot edu
2005-06-02 18:38 ` dnovillo at gcc dot gnu dot org
2005-06-02 18:56 ` pinskia at gcc dot gnu dot org
2005-09-10 18:11 ` pinskia at gcc dot gnu 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).