Skip to content

[llvm][AArch64] Avoid iterating off the beginning of a BB in a backwa… - #13970

Merged
AnthonyLatsis merged 1 commit into
stable/23.xfrom
jepa-stable
Aug 21, 2026
Merged

[llvm][AArch64] Avoid iterating off the beginning of a BB in a backwa…#13970
AnthonyLatsis merged 1 commit into
stable/23.xfrom
jepa-stable

Conversation

@AnthonyLatsis

Copy link
Copy Markdown

…rd scan (llvm#217752)

... using a reversed range, rather than raw iterator comparisons, which got us in trouble previously in a block that was entirely made up of FrameDestroy instructions.

rdar://185425744
(cherry picked from commit ab0b549)

I am leaving out the test because we need this fix ASAP, and I am not sure how to correctly adjust the test to pass on this branch. The author of the original commit promised to follow up on that.

…rd scan (llvm#217752)

... using a reversed range, rather than raw iterator comparisons, which
got us in trouble previously in a block that was entirely made up of
FrameDestroy instructions.

rdar://185425744
(cherry picked from commit ab0b549)

I am leaving out the test because we need this fix ASAP, and I am not
sure how to correctly adjust the test to pass on this branch. The author
of the original commit promised to follow up on that.
@AnthonyLatsis
AnthonyLatsis merged commit 87fd352 into stable/23.x Aug 21, 2026
@AnthonyLatsis
AnthonyLatsis deleted the jepa-stable branch August 21, 2026 14:46
@jroelofs

Copy link
Copy Markdown

LGTM. I'll pick the test shortly.

// outside the red-zone.
SmallVector<MachineInstr *, 2> SPMods;
if (ArgumentStackToRestore > 0) {
for (auto I = MBBI; I->getFlag(MachineInstr::FrameDestroy); --I) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We lost the FrameDestroy check here. Adding it back, along with the test in #13975

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