Skip to content

Conversation

rastogishubham
Copy link

In describeORRLoadedValue in AArch64InstrInfo.cpp, we try to check if an instruction is a copy like instruction, the isCopyLikeInstr function returns a pair of destination and source registers. If any of them are undef, we should just return a nullopt to avoid any crashes later in the code when trying to get the SubReg for one of those registers.

rdar://158581204

In describeORRLoadedValue in AArch64InstrInfo.cpp, we try to check if an
instruction is a copy like instruction, the isCopyLikeInstr function
returns a pair of destination and source registers. If any of them are
undef, we should just return a nullopt to avoid any crashes later in the
code when trying to get the SubReg for one of those registers.

rdar://158581204
Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

LGTM, let's also do this upstream!

@adrian-prantl
Copy link

@swift-ci test

@adrian-prantl
Copy link

@swift-ci test llvm

@adrian-prantl adrian-prantl merged commit 6d67f0b into swiftlang:stable/21.x Aug 28, 2025
0 of 5 checks passed
@rastogishubham rastogishubham deleted the FixReg branch August 28, 2025 17:38
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