POWER10: Improve axpy performance

This patch aligns the stores to 32 byte boundary for saxpy and daxpy
before entering into vector pair loop. Fox caxpy, changed the store
instructions to stxv to improve performance of unaligned cases.
This commit is contained in:
Rajalakshmi Srinivasaraghavan
2020-12-10 11:51:42 -06:00
parent 83de62c20d
commit 346e30a46a
3 changed files with 37 additions and 16 deletions
+11 -4
View File
@@ -66,12 +66,19 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
if ( (inc_x == 1) && (inc_y == 1) )
{
BLASLONG n1 = n & -16;
if ( n >= 16 )
{
BLASLONG align = ((32 - ((uintptr_t)y & (uintptr_t)0x1F)) >> 3) & 0x3;
for (i = 0; i < align; i++) {
y[i] += da * x[i] ;
}
}
BLASLONG n1 = (n-i) & -16;
if ( n1 )
daxpy_kernel_8(n1, &x[i], &y[i], da);
if ( n1 )
daxpy_kernel_8(n1, x, y, da);
i += n1;
i = n1;
while(i < n)
{