IBM Support

IV29268: INEFFICIENT LOAD OF A 64-BIT CONSTANT

Fixes are available

March 2013 PTF for XL C for AIX, V12.1
March 2013 PTF for XL C/C++ for AIX, V12.1
XL C for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C for AIX Fix Pack 5 (September 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 5 (September 2013 PTF) for 12.1
XL C for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 17 (November 2016 Update) for 12.1

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Inefficient constant of sparsely filled 64-bit constants
    
    0x4100000000000001ULL and 0xBEFFFFFFFFFFFFFE
    
    xlC uses inefficient load from constant area of a 64-bit
    constant that has some bits at the beginning and some bits at
    the end (together <= 16-bits). This could be loaded by addi +
    rotate much more efficient.
    
    Sample input:
    $ cat test.C
    extern "C" unsigned long long c41000001()
    {
       return 0x4100000000000001ULL;
    }
    $
    
    extract from listing file:
         | 000000                           PDEF     c41000001
        2|                                  PROC
        4| 000000 ld       E8620008   1     L8
    gr3=.+CONSTANT_AREA
    (gr2,0)
        4| 000004 ld       E8630000   1     L8
    gr3=+CONSTANT_AREA
    (gr3,0)
        5| 000008 bclr     4E800020   1     BA        lr
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Any user using 64-bit mode with 64-bit integer constants with
    at least 49 contiguous bits of all 1s or all 0s is affected by
    this issue.
    
    PROBLEM DESCRIPTION:
    A load from the constant area is generated for values which can
    be generated using a load immediate and rotate sequence.
    

Problem conclusion

  • The compiler has been improved to exploit load immediate and
    rotate to generate 64-bit integer constants when possible.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV29268

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-10-02

  • Closed date

    2013-03-12

  • Last modified date

    2013-03-13

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

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

    LI77326

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RC10 PSY U858497

       UP C



Document information

More support for: XL C for AIX
Compiler

Software version: 12.1

Reference #: IV29268

Modified date: 13 March 2013