IBM Support

LI76655: LONG TYPE LOOP INDEX CAUSES SLOWDOWN AT O3

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Consider the following testcase:
    
    $cat t.c
    ////////////////////////////////////////
    void foo(double *x)
    {
      TYPE i;
      for (i = 0; i < 100; i++)
        *x++ += 1.1;
    }
    
    double z[1000];
    
    int main()
    {
      int i;
      memset(z,0,sizeof(z));
      for (i = 0; i < 60*1000*1000; i++)
        foo(z);
      return 0;
    }
    ////////////////////////////////////////
    
    Compile with:
    
    xlc t.c -q64 -DTYPE=long -O
    xlc t.c -q64 -DTYPE=long -O3
    
    and
    
    xlc t.c -q64 -DTYPE=int -O
    xlc t.c -q64 -DTYPE=int -O3
    
    The executable compiled with -O3 and -DTYPE=long exhibits worse
    runtime performance than the one compiled with lower level of
    optimization (-O). This regression does not occur with
    -DTYPE=int.
    

Local fix

  • N/A
    

Problem summary

  • Performance degradation due to over-aggressive unrolling
    

Problem conclusion

  • Fixed a potential performance problem due to complete unrolling
    of high iteration count loops.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76655

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-02-06

  • Closed date

    2012-02-06

  • Last modified date

    2012-02-06

  • APAR is sysrouted FROM one or more of the following:

    IV09175

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5724X1400

Applicable component levels



Document information

More support for: XL C/C++ for Linux

Software version: B10

Reference #: LI76655

Modified date: 06 February 2012