Skip to content

Commit d38be78

Browse files
vtjnashclaude
andcommitted
arm64: fix clang ICE on Windows for zdot_thunderx2t99.c
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>
1 parent 68ff451 commit d38be78

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

kernel/arm64/dznrm2_thunderx2t99_fast.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ static double nrm2_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x)
155155
" cmp "J", xzr \n"
156156
" beq .Lnrm2_kernel_F1 \n"
157157

158+
/* https://github.com/llvm/llvm-project/issues/149547 */
159+
#if !(defined(__clang__) && defined(OS_WINDOWS))
158160
" .align 5 \n"
161+
#endif
159162
".Lnrm2_kernel_F: \n"
160163
" "KERNEL_F" \n"
161164
" subs "J", "J", #1 \n"

kernel/arm64/scnrm2_thunderx2t99.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ static double nrm2_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x)
238238
" cmp "J", xzr \n"
239239
" beq 5f //nrm2_kernel_S_BEGIN \n"
240240

241+
/* https://github.com/llvm/llvm-project/issues/149547 */
242+
#if !(defined(__clang__) && defined(OS_WINDOWS))
241243
" .align 5 \n"
244+
#endif
242245
"2: //nrm2_kernel_F: \n"
243246
" "KERNEL_F" \n"
244247
" subs "J", "J", #1 \n"

kernel/arm64/zdot_thunderx2t99.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ static void zdot_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLON
236236
" cmp "J", xzr \n"
237237
" beq 3f //dot_kernel_F1 \n"
238238

239+
/* https://github.com/llvm/llvm-project/issues/149547 */
240+
#if !(defined(__clang__) && defined(OS_WINDOWS))
239241
" .align 5 \n"
242+
#endif
240243
"2: //dot_kernel_F: \n"
241244
" "KERNEL_F" \n"
242245
" subs "J", "J", #1 \n"

kernel/arm64/zsum_thunderx2t99.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ static FLOAT zasum_compute(BLASLONG n, FLOAT *x, BLASLONG inc_x)
136136
" cmp "J", xzr \n"
137137
" beq 3f //asum_kernel_F1 \n"
138138

139+
/* https://github.com/llvm/llvm-project/issues/149547 */
140+
#if !(defined(__clang__) && defined(OS_WINDOWS))
139141
".align 5 \n"
142+
#endif
140143
"2: //asum_kernel_F16: \n"
141144
" "KERNEL_F16" \n"
142145
" subs "J", "J", #1 \n"

0 commit comments

Comments
 (0)