public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14052] New: Combiner weakness
@ 2004-02-06 22:47 falk at debian dot org
2004-02-06 22:52 ` [Bug optimization/14052] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: falk at debian dot org @ 2004-02-06 22:47 UTC (permalink / raw)
To: gcc-bugs
For this code:
int f1(int x) { return x == 1 || x == 3; }
int f2(int x) { return x == 1 || x == 3 || x == 1; }
I get:
0000000000000000 <f1>:
0: a1 75 00 42 cmpeq a0,0x3,t0
4: a0 35 00 42 cmpeq a0,0x1,v0
8: 00 04 01 44 or v0,t0,v0
c: 01 80 fa 6b ret
0000000000000010 <f2>:
10: a0 35 00 42 cmpeq a0,0x1,v0
14: a2 75 00 42 cmpeq a0,0x3,t1
18: 01 04 02 44 or v0,t1,t0
1c: a0 03 e0 43 cmpult zero,v0,v0
20: c0 34 20 44 cmovne t0,0x1,v0
24: 01 80 fa 6b ret
combine should have realized that t0 has at most the low bit set and cmpult
therefore is always false.
--
Summary: Combiner weakness
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug optimization/14052] Combiner weakness
2004-02-06 22:47 [Bug optimization/14052] New: Combiner weakness falk at debian dot org
@ 2004-02-06 22:52 ` pinskia at gcc dot gnu dot org
2004-05-09 23:13 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-06 22:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-06 22:52 -------
Confirmed or the thread jumper should see this also.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-02-06 22:52:43
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug optimization/14052] Combiner weakness
2004-02-06 22:47 [Bug optimization/14052] New: Combiner weakness falk at debian dot org
2004-02-06 22:52 ` [Bug optimization/14052] " pinskia at gcc dot gnu dot org
@ 2004-05-09 23:13 ` pinskia at gcc dot gnu dot org
2004-05-26 12:24 ` [Bug tree-optimization/14052] " pinskia at gcc dot gnu dot org
2005-02-15 0:14 ` law at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-09 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-09 23:13 -------
PR 15357 needs to be fixed before this gets fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15357
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/14052] Combiner weakness
2004-02-06 22:47 [Bug optimization/14052] New: Combiner weakness falk at debian dot org
2004-02-06 22:52 ` [Bug optimization/14052] " pinskia at gcc dot gnu dot org
2004-05-09 23:13 ` pinskia at gcc dot gnu dot org
@ 2004-05-26 12:24 ` pinskia at gcc dot gnu dot org
2005-02-15 0:14 ` law at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-26 12:24 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/14052] Combiner weakness
2004-02-06 22:47 [Bug optimization/14052] New: Combiner weakness falk at debian dot org
` (2 preceding siblings ...)
2004-05-26 12:24 ` [Bug tree-optimization/14052] " pinskia at gcc dot gnu dot org
@ 2005-02-15 0:14 ` law at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: law at redhat dot com @ 2005-02-15 0:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From law at redhat dot com 2005-02-14 20:13 -------
It seems to me that the SSA optimizers ought to have removed the redundant test
well before we get into the RTL code. And it appears to me that they do I
get identical code for both tests out of the SSA optimizers.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14052
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-14 20:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 22:47 [Bug optimization/14052] New: Combiner weakness falk at debian dot org
2004-02-06 22:52 ` [Bug optimization/14052] " pinskia at gcc dot gnu dot org
2004-05-09 23:13 ` pinskia at gcc dot gnu dot org
2004-05-26 12:24 ` [Bug tree-optimization/14052] " pinskia at gcc dot gnu dot org
2005-02-15 0:14 ` law at redhat dot com
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).