IBM Support

IJ08104: INCORRECT CODE GEN FOR POWER8

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • The resulting test case produces an incorrect output at
    runtime when compiled for POWER8:
    
    ===== COMPILE COMMAND:
    xlc -q32 -qdfp -O -qnoansialias -qarch=pwr8 a.c b.c -o a
    
    ===== TESTCASE:
    $ cat a.c
    #include <stdio.h>
    _Decimal128 a[5] = { 1, 2, 3, 4, 5 };
    int b[5];
    void f(_Decimal128 *a, int *b, int n);
    int main() {
         f(a, b, 5);
         printf("%d %d %d %d %d\n", b[0], b[1], b[2], b[3], b[4]);
         return 0;
    }
    $
    $ cat b.c
    void f(_Decimal128 *a, int *b, int n) {
         for (int i = 0; i < n; i++)
             b[i] = (int)a[i];
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ ./a
    0 0 0 0 2147483647
    $
    
    
    ===== EXPECTED OUTPUT:
    $ ./a
    1 2 3 4 5
    $
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Clients who compile applications meant to run on POWER8 may be
    affected by this issue
    
    PROBLEM DESCRIPTION:
    This test case exposes an issue in one of the internal compiler
    optimizations.  A certain internal variable is sometimes a
    register copy and sometimes a transfer
    between float and vector registers. The problem is that we
    propagate a float register into a vector instruction and then
    fail to save and restore properly across a call.
    

Problem conclusion

  • The internal optimization has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ08104

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    D13

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-08-01

  • Closed date

    2018-08-01

  • Last modified date

    2018-08-01

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

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

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels



Document information

More support for: XL C for AIX
Compiler

Software version: D13

Reference #: IJ08104

Modified date: 01 August 2018