Skip to content

[CI] Move gold linker flag to Linux-only in reusable workflow#1

Open
F-Stuckmann wants to merge 2 commits into
aie-publicfrom
claude/debug-windows-tests-JQIAP
Open

[CI] Move gold linker flag to Linux-only in reusable workflow#1
F-Stuckmann wants to merge 2 commits into
aie-publicfrom
claude/debug-windows-tests-JQIAP

Conversation

@F-Stuckmann
Copy link
Copy Markdown
Owner

The -DLLVM_USE_LINKER=gold flag was being passed via extra_cmake_args
to all platforms including Windows. The gold linker is Linux-only and
meaningless on MSVC (where link.exe ignores the -fuse-ld=gold flag).

Move the flag into the Linux-specific section of llvm-project-tests.yml
and remove it from the callers' extra_cmake_args. This ensures:

  • Linux builds continue to use the gold linker for faster link times
  • Windows builds no longer receive an irrelevant linker flag
  • macOS builds are unaffected (they never used gold)

https://claude.ai/code/session_017NN2b54K47DTW7awZEKXx9

The -DLLVM_USE_LINKER=gold flag was being passed via extra_cmake_args
to all platforms including Windows. The gold linker is Linux-only and
meaningless on MSVC (where link.exe ignores the -fuse-ld=gold flag).

Move the flag into the Linux-specific section of llvm-project-tests.yml
and remove it from the callers' extra_cmake_args. This ensures:
- Linux builds continue to use the gold linker for faster link times
- Windows builds no longer receive an irrelevant linker flag
- macOS builds are unaffected (they never used gold)

https://claude.ai/code/session_017NN2b54K47DTW7awZEKXx9
Fix the 5 tests that fail on windows-2022 in the AIEngine Upstream
Tests CI workflow:

1. LLVM-Unit :: ExecutionEngine/Orc/OrcJITTests.exe
   ReOptimizeLayerTest.BasicReOptimization: On Windows, the default
   InProcessMemoryManager can return non-contiguous allocations, causing
   .pdata (SEH unwind data) Pointer32 relocations to overflow when
   reaching .text. Use MapperJITLinkMemoryManager with a 10MB contiguous
   slab instead. (Upstream fix: llvm/llvm-project#163495)

2-5. Clang :: CodeGen/fake-use-this.cpp
     Clang :: CodeGen/fake-use-noreturn.cpp
     Clang :: CodeGen/fake-use-determinism.c
     Clang :: CodeGen/extend-variable-liveness.c
   These tests lacked an explicit -triple, so on Windows they used the
   host triple (x86_64-pc-windows-msvc). The CHECK patterns expect
   Itanium ABI name mangling (_Z... symbols), which doesn't match MSVC
   mangling. Add -triple x86_64-unknown-linux-gnu to each.
   (Upstream fix: llvm/llvm-project@de9b0dd)

Also add triple to extend-variable-liveness-except.cpp which uses
__cxa_begin_catch (Itanium EH, not available under MSVC ABI).

https://claude.ai/code/session_017NN2b54K47DTW7awZEKXx9
F-Stuckmann pushed a commit that referenced this pull request Apr 16, 2026
…ible (#123752)

This patch adds a new option `-aarch64-enable-zpr-predicate-spills`
(which is disabled by default), this option replaces predicate spills
with vector spills in streaming[-compatible] functions.

For example:

```
str	p8, [sp, Xilinx#7, mul vl]            // 2-byte Folded Spill
// ...
ldr	p8, [sp, Xilinx#7, mul vl]            // 2-byte Folded Reload
```

Becomes:

```
mov	z0.b, p8/z, #1
str	z0, [sp]                        // 16-byte Folded Spill
// ...
ldr	z0, [sp]                        // 16-byte Folded Reload
ptrue	p4.b
cmpne	p8.b, p4/z, z0.b, #0
```

This is done to avoid streaming memory hazards between FPR/vector and
predicate spills, which currently occupy the same stack area even when
the `-aarch64-stack-hazard-size` flag is set.

This is implemented with two new pseudos SPILL_PPR_TO_ZPR_SLOT_PSEUDO
and FILL_PPR_FROM_ZPR_SLOT_PSEUDO. The expansion of these pseudos
handles scavenging the required registers (z0 in the above example) and,
in the worst case spilling a register to an emergency stack slot in the
expansion. The condition flags are also preserved around the `cmpne` in
case they are live at the expansion point.
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