IBM Support

IV25666: BRANCH HINTS WITH EXECUTION_FREQUENCY IGNORED

Fixes are available

August 2012 PTF for XL C for AIX, V12.1
August 2012 PTF for XL C/C++ for AIX, V12.1
November 2012 PTF for XL C for AIX, V12.1
November 2012 PTF for XL C/C++ for AIX, V12.1
March 2013 PTF for XL C for AIX, V12.1
March 2013 PTF for XL C/C++ for AIX, V12.1
XL C/C++ for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 5 (September 2013 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/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/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
XL C for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL 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 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 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 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 21 (January 2019 Update) for 12.1
XL C for AIX Fix Pack 21 (January 2019 Update) for 12.1

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When a client specifically uses the
    _Pragma("execution_frequency(very_low)"), the compiler should
    respect it and set the hint bits accordingly.
    
    But, below is a section of a listing where the compiler was
    ignoring the user pragma:
    
    Listing file:
    
    
         | 000000                           PDEF
    sqlv_dec31_add_dec31(unsigned char *, const unsigned char *
    const, size_t)
         | 000000                           AKA
    sqlv_dec31_add_dec31__FPUcCPCUcUl
       36|                                  PROC
    sum,addend,addendLength,gr3-gr5
        0| 000000 std      FBE1FFF8   1     ST8
    #stack(gr1,-8)=gr31
     1444| 000004 cmpldi   28250010   1     CL8       cr0=gr5,16
     1444| 000008 ld       E8C20008   1     L8
    gr6=.$STATIC(gr2,0)
     1444| 00000C rlwinm   54A51E38   1     RN4       gr5=gr5,3,0xF8
     1444| 000010 ldx      7C06282A   1     L8
    gr0=$STATIC(gr6,gr5,0)
     1444| 000014 bc       41810018   1     BT
    CL.141,cr0,0x10/lgt,taken=50%(0,0) <---- Ignored here
     1444| 000018 mtspr    7C0903A6   1     LCTR      ctr=gr0
     1444| 00001C bcctr    4E800420   1     BA        ctr,*11182,147
    
    The indicated branch above is marked 50/50, but should be
    marked as taken rarely.
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    Anyone using the pragma to indicate cold branches that are
    simple enough to transform into a SEL instruction are affected
    by this issue.
    TPO must be involved (-O3 or above).
    
    PROBLEM DESCRIPTION:
    pragma execution_frequency(very_low) is getting misplaced by
    TPO causing sub-optimal code-gen
    

Problem conclusion

  • The issue has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV25666

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-08-03

  • Closed date

    2012-08-03

  • Last modified date

    2012-08-03

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

    IV22269

  • 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: 12.1

Reference #: IV25666

Modified date: 03 August 2012