http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52890
Bug #: 52890
Summary: Revision 185336 causes 10% degradation on cpu2000
benchmark 252.eon
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Host: powerpc64-linux
Target: powerpc64-linux
Build: powerpc64-linux
Following testcase extracted from benchmark file mrXZRectangle.cc.
$ cat test.cc
// g++ -m64 -O2 -mcpu=power7 -S test.cc
class ggVector3 {
public:
ggVector3() {e[0] = 1.0; e[1] = e[2] = 0.0; }
ggVector3(double e0, double e1, double e2) {
e[0] = e0; e[1] = e1; e[2] = e2; }
double e[3];
};
class ggONB3 {
public:
ggONB3() { }
ggONB3(const ggVector3& a, const ggVector3& b, const ggVector3& c) {
U = a; V = b; W = c; }
private:
ggVector3 U,V,W;
};
class mrViewingHitRecord {
public:
ggONB3 UVW;
};
void foo(mrViewingHitRecord& VHR)
{
VHR.UVW = ggONB3(ggVector3 (1, 0, 0),
ggVector3 (0, 0, -1),
ggVector3 (0, 1, 0));
}
Revision 185335 produces tight sequence of 8-byte stores:
stfd 0,8(3)
stfd 0,16(3)
stfd 0,24(3)
stfd 0,32(3)
...
Revision 185336, with additional check for SLOW_UNALIGNED_ACCESS now causes
path through store_bit_field() which generates a much larger sequence of byte
stores.
stb 8,0(3)
stb 10,1(3)
stb 9,2(3)
stb 9,3(3)
stb 9,4(3)
stb 9,5(3)
...