From a68b316ca4852509f84ed50e01afac486bf70f58 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Wed, 17 Sep 2014 11:10:07 -0500 Subject: [PATCH] Fixed alignment bugs in level-1f kernels. Details: - Fixed bugs whereby the level-1f dotxf, axpyxf, and dotxaxpyf kernels were attempting to compute problems with unaligned leading dimensions with optimized code, rather than (correctly) using the reference implementations. Thanks to Devin Matthews for reporting this bug. --- kernels/x86_64/core2-sse3/1f/bli_axpyf_opt_var1.c | 3 ++- kernels/x86_64/core2-sse3/1f/bli_dotxaxpyf_opt_var1.c | 3 ++- kernels/x86_64/core2-sse3/1f/bli_dotxf_opt_var1.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kernels/x86_64/core2-sse3/1f/bli_axpyf_opt_var1.c b/kernels/x86_64/core2-sse3/1f/bli_axpyf_opt_var1.c index 631c572a8..bdb9ff5ff 100644 --- a/kernels/x86_64/core2-sse3/1f/bli_axpyf_opt_var1.c +++ b/kernels/x86_64/core2-sse3/1f/bli_axpyf_opt_var1.c @@ -91,7 +91,8 @@ void bli_daxpyf_opt_var1( { use_ref = TRUE; } - else if ( inca != 1 || incx != 1 || incy != 1 ) + else if ( inca != 1 || incx != 1 || incy != 1 || + bli_is_unaligned_to( lda, 16 ) ) { use_ref = TRUE; } diff --git a/kernels/x86_64/core2-sse3/1f/bli_dotxaxpyf_opt_var1.c b/kernels/x86_64/core2-sse3/1f/bli_dotxaxpyf_opt_var1.c index 57bef435c..af21ede35 100644 --- a/kernels/x86_64/core2-sse3/1f/bli_dotxaxpyf_opt_var1.c +++ b/kernels/x86_64/core2-sse3/1f/bli_dotxaxpyf_opt_var1.c @@ -115,7 +115,8 @@ void bli_ddotxaxpyf_opt_var1( conj_t conjat, { use_ref = TRUE; } - else if ( inca != 1 || incw != 1 || incx != 1 || incy != 1 || incz != 1 ) + else if ( inca != 1 || incw != 1 || incx != 1 || incy != 1 || incz != 1 || + bli_is_unaligned_to( lda, 16 ) ) { use_ref = TRUE; } diff --git a/kernels/x86_64/core2-sse3/1f/bli_dotxf_opt_var1.c b/kernels/x86_64/core2-sse3/1f/bli_dotxf_opt_var1.c index 5835beef5..741463925 100644 --- a/kernels/x86_64/core2-sse3/1f/bli_dotxf_opt_var1.c +++ b/kernels/x86_64/core2-sse3/1f/bli_dotxf_opt_var1.c @@ -103,7 +103,8 @@ void bli_ddotxf_opt_var1( { use_ref = TRUE; } - else if ( inca != 1 || incx != 1 || incy != 1 ) + else if ( inca != 1 || incx != 1 || incy != 1 || + bli_is_unaligned_to( lda, 16 ) ) { use_ref = TRUE; }