IBM Support

LI77327: INEFFICIENT 64-BIT CONSTANT LOAD OF 32-BIT VALUE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • xlC loads from constant area while it is more efficient to use
    immediate instructions.
    
    Pattern:
    First 32-bits are zero
    Next 16-bit start with 1-bit
    Next 16-bit value does not start with 1-bit
    
    Take this sample:
    extern "C" unsigned long long res()
    {
            return 0x82160001ULL;
    }
    
    xlC listing outputs:
         | 000000                           PDEF     res
        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
         |               Tag Table
         | 00000C        00000000 00092000 00000000 0000000C
         |               Instruction count            3
         |               Straight-line exec time      3
         |               Constant Area
         | 000000        00000000 82160001
    
    If using immediate instructions for above example, it would be
    more efficient:
    
    li rx,1
    oris rx,rx,0x8216
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION: The compiler is not as efficient as it
    could be when loading certain constants.
    
    USERS AFFECTED: Users who use a constant that starts with 32
    zero-bits, has a 0 in the 49th bit, and a 1 for the 33rd bit
    when represented with 64-bits.
    

Problem conclusion

  • Added code to identify these constants and build them instead
    of loading them from the constant area.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI77327

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5725C7300

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-27

  • Closed date

    2013-04-27

  • Last modified date

    2013-04-27

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

    IV30067

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

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5725C7300

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
14 October 2021