Fixed diagonal packing for C/Z TRSM small

- In C/Z TRSM small, packing in case of unit diagonal
  is not handled properly.
- Diagonal elements are still being read even in case of
  unit diagonal.
- This causes "Conditional jump or move depends on
  uninitialised value" error during valgrind tests.
- To fix this, diagonal elements should not be read
  in case of unit diagonal.

AMD-Internal: [CPUPL-3406]
Change-Id: If3d6965299998a83d87f3a032f654fc7f8c43d4e
This commit is contained in:
Shubham Sharma
2023-05-17 03:02:26 +05:30
committed by Shubham Sharma
parent 9ee95e171a
commit 26e120ea25

View File

@@ -8188,6 +8188,16 @@ BLIS_INLINE void ztrsm_small_pack_diag_element
dim_t size
)
{
if ( is_unitdiag )
{
dcomplex ones = {1.0, 0.0};
for( dim_t i = 0; i < size; i++)
{
d11_pack[i].real = ones.real;
d11_pack[i].imag = ones.imag;
}
return;
}
#ifdef BLIS_ENABLE_TRSM_PREINVERSION
// If Preinversion is enabled, inverse the diaganol
// elements from A and pack into diagonal buffer.
@@ -39478,6 +39488,16 @@ BLIS_INLINE void ctrsm_small_pack_diag_element
dim_t size
)
{
if ( is_unitdiag )
{
scomplex ones = {1.0, 0.0};
for( dim_t i = 0; i < size; i++)
{
d11_pack[i].real = ones.real;
d11_pack[i].imag = ones.imag;
}
return;
}
#ifdef BLIS_ENABLE_TRSM_PREINVERSION
// If Preinversion is disabled, inverse the diaganol
// elements from A and pack into diagonal buffer.