Skip to content

[AMDGPU] SILowerI1Copies: clear kill flags on COPY #65883

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 1 commit into from
Sep 11, 2023

Conversation

perlfu
Copy link
Contributor

@perlfu perlfu commented Sep 10, 2023

Clear kill flags on COPY source as it will be reused.

@perlfu perlfu requested review from jayfoad and arsenm September 10, 2023 08:38
@perlfu perlfu requested a review from a team as a code owner September 10, 2023 08:38
%16:vgpr_32 = COPY $vgpr0
%19:sreg_32 = S_MOV_B32 0
%20:sreg_32 = V_CMP_NE_U32_e64 %16, %19, implicit $exec
%21:sgpr_32 = S_MOV_B32 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you run this through -run-pass=none to compact the register numbers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -708,6 +708,9 @@ bool SILowerI1Copies::lowerCopiesToI1() {
.addImm(0);
MI.getOperand(1).setReg(TmpReg);
SrcReg = TmpReg;
} else {
// SrcReg needs to be live beyond copy.
MI.clearKillInfo();
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you know the exact operand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Clear kill flags on COPY source as it will be reused.
@perlfu perlfu force-pushed the fix-si-lower-i1-copies-kills branch from 8ceed89 to 4afb8e3 Compare September 11, 2023 02:39
@perlfu perlfu merged commit 46ee3b3 into llvm:main Sep 11, 2023
@perlfu perlfu deleted the fix-si-lower-i1-copies-kills branch September 11, 2023 03:30
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
Clear kill flags on COPY source as it will be reused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants