Skip to content

Commit

Permalink
Fixed high impact static analysis issues
Browse files Browse the repository at this point in the history
Initialized ymm and xmm registers to zero to address
un-inilizaed variable errors reported in static analsys.

AMD-Internal: [CPUPL-2078]
Change-Id: Icfcc008a0f244278efd8145d7feef764ed5fcc04
  • Loading branch information
dzambare committed Jun 14, 2022
1 parent 0fd0a3d commit 1a63b9f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kernels/zen/3/bli_dgemm_ref_k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2021, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -394,6 +394,7 @@ void bli_dgemm_ref_k1_nn

if(m_rem == 1)
{
ymm0 = _mm256_setzero_pd();
ymm3 = _mm256_setzero_pd();
ymm5 = _mm256_setzero_pd();
ymm7 = _mm256_setzero_pd();
Expand Down Expand Up @@ -690,6 +691,7 @@ void bli_dgemm_ref_k1_nn

if(m_rem == 1)
{
ymm0 = _mm256_setzero_pd();
ymm3 = _mm256_setzero_pd();
ymm5 = _mm256_setzero_pd();
ymm7 = _mm256_setzero_pd();
Expand Down Expand Up @@ -897,6 +899,7 @@ void bli_dgemm_ref_k1_nn

if(m_rem == 1)
{
ymm0 = _mm256_setzero_pd();
ymm3 = _mm256_setzero_pd();
ymm5 = _mm256_setzero_pd();
ymm15 = _mm256_setzero_pd();
Expand Down Expand Up @@ -1052,6 +1055,7 @@ void bli_dgemm_ref_k1_nn

if(m_rem == 1)
{
ymm0 = _mm256_setzero_pd();
ymm3 = _mm256_setzero_pd();
ymm15 = _mm256_setzero_pd();

Expand Down
8 changes: 7 additions & 1 deletion kernels/zen/3/sup/bli_gemmsup_rv_zen_asm_c3x8n.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2020-2021, Advanced Micro Devices, Inc.
Copyright (C) 2020-2022, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -138,6 +138,8 @@ void bli_cgemmsup_rv_zen_asm_3x8n
for (n_iter = 0; n_iter < n0 / 8; n_iter++)
{
// clear scratch registers.
xmm0 = _mm_setzero_ps();
xmm3 = _mm_setzero_ps();
ymm4 = _mm256_setzero_ps();
ymm5 = _mm256_setzero_ps();
ymm6 = _mm256_setzero_ps();
Expand Down Expand Up @@ -572,6 +574,8 @@ void bli_cgemmsup_rv_zen_asm_2x8n
for (n_iter = 0; n_iter < n0 / 8; n_iter++)
{
// clear scratch registers.
xmm0 = _mm_setzero_ps();
xmm3 = _mm_setzero_ps();
ymm4 = _mm256_setzero_ps();
ymm5 = _mm256_setzero_ps();
ymm6 = _mm256_setzero_ps();
Expand Down Expand Up @@ -919,6 +923,8 @@ void bli_cgemmsup_rv_zen_asm_1x8n
for (n_iter = 0; n_iter < n0 / 8; n_iter++)
{
// clear scratch registers.
xmm0 = _mm_setzero_ps();
xmm3 = _mm_setzero_ps();
ymm4 = _mm256_setzero_ps();
ymm5 = _mm256_setzero_ps();
ymm6 = _mm256_setzero_ps();
Expand Down

0 comments on commit 1a63b9f

Please sign in to comment.