public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/15792] New: missed subreg optimization
@ 2004-06-03 4:27 pinskia at gcc dot gnu dot org
2004-06-15 20:07 ` [Bug rtl-optimization/15792] " bangerth at dealii dot org
2004-08-20 18:47 ` dann at godzilla dot ics dot uci dot edu
0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03 4:27 UTC (permalink / raw)
To: gcc-bugs
int test(unsigned long long x) {
int g = (int)x|((int)(x>>32));
if (g) gh();
}
int test1(unsigned long long x) {
if (x) gh();
}
These two functions should produce the same asm but test produces better asm.
I noticed this when looking PR 11873.
--
Summary: missed subreg optimization
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu
OtherBugsDependingO 11873
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15792
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug rtl-optimization/15792] missed subreg optimization
2004-06-03 4:27 [Bug rtl-optimization/15792] New: missed subreg optimization pinskia at gcc dot gnu dot org
@ 2004-06-15 20:07 ` bangerth at dealii dot org
2004-08-20 18:47 ` dann at godzilla dot ics dot uci dot edu
1 sibling, 0 replies; 3+ messages in thread
From: bangerth at dealii dot org @ 2004-06-15 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-15 20:06 -------
Indeed. In test1, we get a completely bogus sequence:
movl 12(%ebp), %edx
movl 8(%ebp), %eax
movl %edx, %ecx
orl %eax, %ecx
What is the compiler thinking, moving data first into adx just to move
it further into ecx the next moment?
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-15 20:07:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15792
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug rtl-optimization/15792] missed subreg optimization
2004-06-03 4:27 [Bug rtl-optimization/15792] New: missed subreg optimization pinskia at gcc dot gnu dot org
2004-06-15 20:07 ` [Bug rtl-optimization/15792] " bangerth at dealii dot org
@ 2004-08-20 18:47 ` dann at godzilla dot ics dot uci dot edu
1 sibling, 0 replies; 3+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-08-20 18:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-08-20 18:47 -------
(In reply to comment #1)
> Indeed. In test1, we get a completely bogus sequence:
> movl 12(%ebp), %edx
> movl 8(%ebp), %eax
> movl %edx, %ecx
> orl %eax, %ecx
> What is the compiler thinking, moving data first into adx just to move
> it further into ecx the next moment?
This is a regression from gcc-3.0, the mov is not generated there:
movl 16(%esp), %eax
movl 20(%esp), %edx
orl %edx, %eax
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15792
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-20 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 4:27 [Bug rtl-optimization/15792] New: missed subreg optimization pinskia at gcc dot gnu dot org
2004-06-15 20:07 ` [Bug rtl-optimization/15792] " bangerth at dealii dot org
2004-08-20 18:47 ` dann at godzilla dot ics dot uci dot edu
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).