[Bug middle-end/52890] Revision 185336 causes 10% degradation on cpu2000 benchmark 252.eon

pthaugen at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 11 18:35:00 GMT 2012


Pat Haugen <pthaugen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |NEW

--- Comment #7 from Pat Haugen <pthaugen at gcc dot gnu.org> 2012-04-11 18:34:55 UTC ---
I observed similar behavior on loads (8-byte loads transformed to sequence of
byte loads/shifts/ors) with r185470, unaligned read patch. This caused some
sizable degradation on a few benchmarks also.-fno-tree-sra had no effect on the
unaligned load case.

Reduced testcase:

// g++ -S -m64 -O2 -mcpu=power7 load.cc
typedef int ggBoolean;
class mrSurface
template < class T > class ggTrain
public:ggBoolean Append (T item);
  T operator[] (int i) const
    return data[i];
private:  T * data;
  int nData;

class mrSurfaceList:public mrSurface
  virtual void viewingHit () const;
protected:  ggTrain < mrSurface * >surfaces;
extern mrSurface *sPtr;
mrSurfaceList::viewingHit () const 
  sPtr = surfaces[1];


  D.2562_3 = MEM[(const struct ggTrain *)this_1(D) + 8B];
  D.2560_11 = MEM[(struct mrSurface * *)D.2562_3 + 8B];
  sPtr = D.2560_11;

The first MEM[...] gets expanded to the sequence of lbzs/shifts/ors.

More information about the Gcc-bugs mailing list