Skip to content

Fix a regression in gc2stack optimization#4511

Merged
JohanEngelen merged 3 commits intoldc-developers:masterfrom
kubo39:fix-gh4510
Oct 11, 2023
Merged

Fix a regression in gc2stack optimization#4511
JohanEngelen merged 3 commits intoldc-developers:masterfrom
kubo39:fix-gh4510

Conversation

@kubo39
Copy link
Contributor

@kubo39 kubo39 commented Oct 10, 2023

This fixes #4510.
LLVM RAII helper did not fit in case, at 1d969cf.

This fixes ldc-developers#4510.
LLVM RAII helper did not fit in case, at
ldc-developers@1d969cf.
Builder.CreateAlloca(Ty, count, ".nongc_mem"); // FIXME: align?

if (Initialized) {
// For now, only zero-init is supported.
Copy link
Member

Choose a reason for hiding this comment

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

can you improve the comment on line 190-191 to say that the initialization must be put at the original source variable definition location (explicit mention: because it could be in a loop).

@JohanEngelen
Copy link
Member

great, thanks for the fix + testcase. See my comments, mainly reducing the PR to what's needed.

@JohanEngelen JohanEngelen merged commit 60e45d6 into ldc-developers:master Oct 11, 2023
@kubo39 kubo39 deleted the fix-gh4510 branch October 11, 2023 09:18
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.

vector operations are broken with optimization level >= 2

2 participants