Fixes are available
APAR status
Closed as program error.
Error description
When using vector implementation for certain routines extra 'store' instructions are being generated by the compiler. eg: ===============Start of vxor.c=============== unsigned long vxor(void *bp, long len, unsigned long y) { vector unsigned int x = (vector unsigned int) (0); vector unsigned int *p = (vector unsigned int *) bp; long c = len/(sizeof(vector unsigned int)*4); while (c--) { #if XXX x = vec_xor(vec_xor(vec_xor(vec_xor(x, *p++), *p++), *p++),*p++); #else x = vec_xor(x, *p++); x = vec_xor(x, *p++); x = vec_xor(x, *p++); x = vec_xor(x, *p++); #endif } return ((*(unsigned long *) &x) ^ (*(((unsigned long *) &x)+1))); } ===========End of vxor.c=========================== When the above test case is compiled with: $xlc -qarch=pwr6 -qcompact -O3 -q64 -qenablevmx -qaltivec -c vxor.c -qlist the following .lst file shows the extra store instructions. $cat vxor.lst . . . 11| 000064 stvx 7C0101CE 1 VSTQ x(gr1,gr0,0)=vr0 ^----extra store instruction 0| 000068 ori 60210000 1 XNOP 13| 00006C vxor 10411CC4 1 VXOR vr2=vr1,vr3 0| 000070 ori 60210000 1 XNOP 12| 000074 stvx 7C2101CE 1 VSTQ x(gr1,gr0,0)=vr1 ^----extra store instruction 0| 000078 ori 60210000 1 XNOP 14| 00007C vxor 100224C4 1 VXOR vr0=vr2,vr4 13| 000080 stvx 7C4101CE 1 VSTQ x(gr1,gr0,0)=vr2 ^----extra store instruction 0| 000084 ori 60210000 1 XNOP 14| 000088 stvx 7C0101CE 1 VSTQ x(gr1,gr0,0)=vr0 ^----extra store instruction . . .
Local fix
n/a.
Problem summary
Users of PPC970 or POWER6 VMX vector types are affected by this issue. Optimization sometimes failed to remove redundant vector store instructions, or move vector store instructions down out of loops, affecting performance.
Problem conclusion
When optimization removes a redundant address-taken in a function with vector operations, it now also eliminates unnecessary stores and moves stores down out of loops if possible.
Temporary fix
Comments
APAR Information
APAR number
LI74074
Reported component name
XL C/C++ RHEL5
Reported component ID
5724S7310
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-12-17
Closed date
2008-12-17
Last modified date
2008-12-17
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/C++ RHEL5
Fixed component ID
5724S7310
Applicable component levels
R900 PSN IZ33205
UP06/09/13
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
17 October 2021