Skip to content

Cherrypick upstream LLVM changes for OpenBSD to swiftlang stable. #10883

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

Merged
merged 2 commits into from
Jun 22, 2025

Conversation

3405691582
Copy link
Member

These changes are required for LLVM to build and run properly for OpenBSD.

Details on these changes are available in each commit and/or pr.

brad0 and others added 2 commits June 20, 2025 19:41
OpenBSD now has sys/auxv.h but does not use getauxval.
TargetLoweringBase::getIRStackGuard refers to a platform-specific guard
variable. Before this change, TargetLoweringBase::getSDagStackGuard only
referred to a different variable.

This means that SelectionDAGBuilder's getLoadStackGuard does not get
memory operands. However, AArch64InstrInfo::expandPostRAPseudo assumes
that the passed MachineInstr has nonzero memoperands, causing a
segfault.

We have two possible options here: either disabling the LOAD_STACK_GUARD
node entirely in AArch64TargetLowering::useLoadStackGuardNode or just
making the platform-specific values match across TargetLoweringBase.
Here, we try the latter.
@3405691582 3405691582 requested a review from a team as a code owner June 21, 2025 00:28
@3405691582
Copy link
Member Author

@swift-ci please test.

Copy link

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

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

LGTM, these were reviewed upstream and seem pretty low-risk.

@3405691582
Copy link
Member Author

Please merge on my behalf if OK, thank you!

@JDevlieghere JDevlieghere merged commit 4197ac1 into swiftlang:stable/20240723 Jun 22, 2025
3 checks passed
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.

3 participants