-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[CodeGen] Remove dead hack for MIPS #148039
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
base: main
Are you sure you want to change the base?
Conversation
All tests pass without it now.
@llvm/pr-subscribers-llvm-regalloc Author: AZero13 (AZero13) ChangesAll tests pass without it now. Full diff: https://github.com/llvm/llvm-project/pull/148039.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 1f23418642bc6..e857ff665913a 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -534,10 +534,6 @@ void LiveVariables::runOnInstr(MachineInstr &MI,
UseRegs.push_back(MOReg);
} else {
assert(MO.isDef());
- // FIXME: We should not remove any dead flags. However the MIPS RDDSP
- // instruction needs it at the moment: http://llvm.org/PR27116.
- if (MOReg.isPhysical() && !MRI->isReserved(MOReg))
- MO.setIsDead(false);
DefRegs.push_back(MOReg);
}
}
|
// FIXME: We should not remove any dead flags. However the MIPS RDDSP | ||
// instruction needs it at the moment: http://llvm.org/PR27116. | ||
if (MOReg.isPhysical() && !MRI->isReserved(MOReg)) | ||
if (!(MOReg.isPhysical() && MRI->isReserved(MOReg))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't removing the hack, this only removes the comment and regresses the style of the condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the same condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition should be demorganed. The comment also states that dead flags should not be removed, and this is still removing a dead flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just matches the condition in the branch above it
And I actually checked the history of this file, and this was like that before the change
All tests pass without it now.