This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52890] Revision 185336 causes 10% degradation on cpu2000 benchmark 252.eon
- From: "pthaugen at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Apr 2012 16:13:49 +0000
- Subject: [Bug middle-end/52890] Revision 185336 causes 10% degradation on cpu2000 benchmark 252.eon
- Auto-submitted: auto-generated
- References: <bug-52890-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52890
Pat Haugen <pthaugen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |UNCONFIRMED
Ever Confirmed|1 |0
--- Comment #3 from Pat Haugen <pthaugen at gcc dot gnu.org> 2012-04-10 16:13:49 UTC ---
(In reply to comment #2)
> (gdb) prt to
> <mem_ref 0xfffafed2790
> type <real_type 0xfffb0057b60 double DF
> size <integer_cst 0xfffafe125e0 constant 64>
> unit size <integer_cst 0xfffafe12600 constant 8>
> align 8 symtab 0 alias set 2 canonical type 0xfffaff00f18 precision 64>
>
> I suppose SRA does this. Can you check with -fno-tree-sra?
With -fno-tree-sra they both generate the same code, a sequence of 8-byte
stores to build up the rhs, and then a call to memcpy for the entire structure
copy.
At expand phase we now have:
struct ggVector3 D.2563;
struct ggVector3 D.2562;
struct ggVector3 D.2561;
struct ggONB3 D.2573;
# BLOCK 2 freq:10000
# PRED: ENTRY [100.0%] (fallthru,exec)
D.2561.e[0] = 1.0e+0;
D.2561.e[1] = 0.0;
D.2561.e[2] = 0.0;
D.2562.e[0] = 0.0;
D.2562.e[1] = 0.0;
D.2562.e[2] = -1.0e+0;
D.2563.e[0] = 0.0;
D.2563.e[1] = 1.0e+0;
D.2563.e[2] = 0.0;
D.2573.U = D.2561;
D.2573.V = D.2562;
D.2573.W = D.2563;
VHR_1(D)->UVW = D.2573;
Whereas with SRA we had:
MEM[(struct mrViewingHitRecord &)VHR_1(D)] = 1.0e+0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 8] = 0.0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 16] = 0.0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 24] = 0.0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 32] = 0.0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 40] = -1.0e+0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 48] = 0.0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 56] = 1.0e+0;
MEM[(struct mrViewingHitRecord &)VHR_1(D) + 64] = 0.0;