Skip to content

Conversation

@vtjnash
Copy link
Contributor

@vtjnash vtjnash commented Jan 19, 2026

Guard .align directive to avoid internal compiler error on AArch64 Windows with clang.

See: llvm/llvm-project#149547
Update of #5566 to fix remaining issues
See: #5076

Guard .align directive to avoid internal compiler error on
AArch64 Windows with clang.

See: llvm/llvm-project#149547
See: OpenMathLib#5076

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
" beq 3f //dot_kernel_F1 \n"
#ifndef _MSC_VER
/* https://github.com/llvm/llvm-project/issues/149547 */
#if !(defined(__clang__) && defined(OS_WINDOWS))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the _MSC_VER to be equivalent here (it will never match plain MSVC as that can't handle the inline assembly anyway, but it matches any LLVM derivative that uses the clang-cl shim) ?

Copy link
Contributor Author

@vtjnash vtjnash Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be similar? Hard to check exactly if all libc specify that clang+_WIN32 is exactly the same as MSC when this needs to do is to specify clang+_WIN32 and exclude MSVC. It is just very confusing to intentionally use a macro to work around a bug in one specific compiler by specifying that this should be disabled for a completely different compiler

@martin-frbg
Copy link
Collaborator

Thanks - did you happen to check if these changes are sufficient for using these files with WoA ? I think it is likely that they might need changes to the storing of the complex results (similar to the earlier zdot changes) but I won't get around to checking this myself today

@vtjnash
Copy link
Contributor Author

vtjnash commented Jan 19, 2026

Thanks - did you happen to check if these changes are sufficient for using these files with WoA ?

I'm not precisely sure what you want checked. It compiles and seems to pass tests. clang has always supported c99 just fine (unlike MSVC, which still is buggy):

OpenBLAS/common.h

Lines 579 to 583 in 5ffbf38

/* C99 supports complex floating numbers natively, which GCC also offers as an
extension since version 3.0. If neither are available, use a compatible
structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
#if ((defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || \
(__GNUC__ >= 3 && !defined(__cplusplus))) && !(defined(FORCE_OPENBLAS_COMPLEX_STRUCT))) && !defined(_MSC_VER)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants