public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35310] New: Late struct expansion -- missing PRE (2)
@ 2008-02-23 5:27 xinliangli at gmail dot com
2008-02-24 22:13 ` [Bug middle-end/35310] " rguenth at gcc dot gnu dot org
2009-02-06 21:52 ` steven at gcc dot gnu dot org
0 siblings, 2 replies; 4+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-23 5:27 UTC (permalink / raw)
To: gcc-bugs
union U {
struct A {
int a;
int b;
}aa;
long long ll;
};
struct B{
union U u1;
union U u2;
} bg;
struct B bg;
struct B bar();
int foo (int n)
{
if (n)
{
bg = bar();
}
return bg.u1.ll + bg.u2.ll;
};
// Two union fields loads are partially redundant.
gcc genearted code at -O2:
foo:
.LFB2:
subq $24, %rsp
.LCFI0:
testl %edi, %edi
je .L2
xorl %eax, %eax
call bar
movq %rax, bg(%rip)
movq %rdx, bg+8(%rip)
.L2:
movq bg(%rip), %rax
addl bg+8(%rip), %eax
addq $24, %rsp
ret
--
Summary: Late struct expansion -- missing PRE (2)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35310
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35310] Late struct expansion -- missing PRE (2)
2008-02-23 5:27 [Bug middle-end/35310] New: Late struct expansion -- missing PRE (2) xinliangli at gmail dot com
@ 2008-02-24 22:13 ` rguenth at gcc dot gnu dot org
2009-02-06 21:52 ` steven at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-24 22:13 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Keywords| |missed-optimization
Version|unknown |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35310
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35310] Late struct expansion -- missing PRE (2)
2008-02-23 5:27 [Bug middle-end/35310] New: Late struct expansion -- missing PRE (2) xinliangli at gmail dot com
2008-02-24 22:13 ` [Bug middle-end/35310] " rguenth at gcc dot gnu dot org
@ 2009-02-06 21:52 ` steven at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-02-06 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from steven at gcc dot gnu dot org 2009-02-06 21:52 -------
Confirmed. Looks like something for postreload-gcse to handle. Before that,
there are no partial redundancies in the RTL (at least, not in the quick look I
gave it).
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-02-06 21:52:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35310
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/35310] Late struct expansion -- missing PRE (2)
[not found] <bug-35310-4@http.gcc.gnu.org/bugzilla/>
@ 2012-10-31 21:17 ` xinliangli at gmail dot com
0 siblings, 0 replies; 4+ messages in thread
From: xinliangli at gmail dot com @ 2012-10-31 21:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35310
--- Comment #2 from davidxl <xinliangli at gmail dot com> 2012-10-31 21:17:27 UTC ---
GCC is still not generating good code here, neither does ICC.
However LLVM does a good job here.
David
(In reply to comment #1)
> Confirmed. Looks like something for postreload-gcse to handle. Before that,
> there are no partial redundancies in the RTL (at least, not in the quick look I
> gave it).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-31 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 5:27 [Bug middle-end/35310] New: Late struct expansion -- missing PRE (2) xinliangli at gmail dot com
2008-02-24 22:13 ` [Bug middle-end/35310] " rguenth at gcc dot gnu dot org
2009-02-06 21:52 ` steven at gcc dot gnu dot org
[not found] <bug-35310-4@http.gcc.gnu.org/bugzilla/>
2012-10-31 21:17 ` xinliangli at gmail 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).