Skip to content

CI: Bump LDC-LLVM to v20.1.3 #4911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft

Conversation

kinke
Copy link
Member

@kinke kinke commented Apr 19, 2025

No description provided.

kinke added 2 commits April 19, 2025 07:44
Based on checking the `ldc2 -help` output when using LLVM 20 and 19
on Linux x86_64 (with all targets enabled, incl. experimental SPIRV/
Xtensa). And comparing that against official LDC v1.34 with LLVM 16.
@kinke
Copy link
Member Author

kinke commented Apr 19, 2025

There's a 32-bit x86 optimizer (?) regression blocking more CI results for the Win32 and Linux multilib CI jobs. This hits an LLVM 20 assertion:

$ bin/ldc2 -c -unittest ../ldc/runtime/druntime/src/core/internal/container/array.d -d-version=CoreUnittest -m32 -release -O
ldc2: /home/martin/dev/llvm-project/llvm/include/llvm/ADT/APInt.h:127: llvm::APInt::APInt(unsigned int, uint64_t, bool, bool): Assertion `llvm::isUIntN(BitWidth, val) && "Value is not an N-bit unsigned value"' failed.
[…]
#11 0x000064fa30bbae89 llvm::maxIntN(long) /home/martin/dev/llvm-project/llvm/include/llvm/Support/MathExtras.h:252:35
#12 0x000064fa30bbae89 llvm::isIntN(unsigned int, long) /home/martin/dev/llvm-project/llvm/include/llvm/Support/MathExtras.h:262:53
#13 0x000064fa30bbae89 llvm::APInt::APInt(unsigned int, unsigned long, bool, bool) /home/martin/dev/llvm-project/llvm/include/llvm/ADT/APInt.h:120:11
#14 0x000064fa3487eb66 llvm::BasicAAResult::aliasGEP(llvm::GEPOperator const*, llvm::LocationSize, llvm::Value const*, llvm::LocationSize, llvm::Value const*, llvm::Value const*, llvm::AAQueryInfo&) /home/martin/dev/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp:1308:21
#15 0x000064fa3487fa4f llvm::BasicAAResult::aliasCheckRecursive(llvm::Value const*, llvm::LocationSize, llvm::Value const*, llvm::LocationSize, llvm::AAQueryInfo&, llvm::Value const*, llvm::Value const*) /home/martin/dev/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp:1777:5
#16 0x000064fa34881e0f llvm::BasicAAResult::aliasCheck(llvm::Value const*, llvm::LocationSize, llvm::Value const*, llvm::LocationSize, llvm::AAQueryInfo&, llvm::Instruction const*) /home/martin/dev/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp:1722:33
#17 0x000064fa3488255c llvm::BasicAAResult::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&, llvm::AAQueryInfo&, llvm::Instruction const*) /home/martin/dev/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp:890:73
#18 0x000064fa34858ef2 llvm::AAResults::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&, llvm::AAQueryInfo&, llvm::Instruction const*) /home/martin/dev/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp:125:23
#19 0x000064fa3485af28 llvm::AAResults::getModRefInfo(llvm::LoadInst const*, llvm::MemoryLocation const&, llvm::AAQueryInfo&) /home/martin/dev/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp:441:5
#20 0x000064fa3485af28 llvm::AAResults::getModRefInfo(llvm::Instruction const*, std::optional<llvm::MemoryLocation> const&, llvm::AAQueryInfo&) /home/martin/dev/llvm-project/llvm/lib/Analysis/AliasAnalysis.cpp:580:25
#21 0x000064fa3422da4b llvm::SimpleCaptureAnalysis::~SimpleCaptureAnalysis() /home/martin/dev/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h:162:7
#22 0x000064fa3422da4b llvm::SimpleAAQueryInfo::~SimpleAAQueryInfo() /home/martin/dev/llvm-project/llvm/include/llvm/Analysis/AliasAnalysis.h:305:7
[…]

Edit: Seems to happen for all 32-bit targets, at least for Android ARMv7-A and riscv32.

@liushuyu
Copy link
Contributor

I can take a look.
Sorry, I was busy with a lot of IRL stuff recently and was unable to do anything else.

@kinke
Copy link
Member Author

kinke commented Apr 21, 2025

No worries! - Yeah it'd be great if you could look into that problem.

@kinke kinke force-pushed the llvm-20_2 branch 2 times, most recently from ef25b12 to 737d77d Compare April 26, 2025 16:12
kinke added 2 commits April 26, 2025 18:42
Where the ASan pass now apparently adds a `nosanitize_address` IR module
flag, breaking these tests.
@kinke
Copy link
Member Author

kinke commented Apr 26, 2025

The same LLVM assertion is also hit for lit-test dynamiccompile/bind_bool.d, on macOS (where it's the single remaining failure for both x86_64 and arm64 archs) and Linux aarch64.

Looks like the other remaining failures on non-macOS are all dynamic-compile related - 4 hanging lit-tests on Windows x64 (incl. bind_bool.d), and 28 failures on Linux aarch64 (seemingly getting a signal 2 - interrupt).

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