-
Couldn't load subscription status.
- Fork 15k
RegisterCoalescer: Avoid return after else #161622
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
RegisterCoalescer: Avoid return after else #161622
Conversation
|
@llvm/pr-subscribers-llvm-regalloc Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/161622.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 7ac1aef83777a..ebfea8e5581bf 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -584,14 +584,14 @@ bool CoalescerPair::isCoalescable(const MachineInstr *MI) const {
return DstReg == Dst;
// This is a partial register copy. Check that the parts match.
return Register(TRI.getSubReg(DstReg, SrcSub)) == Dst;
- } else {
- // DstReg is virtual.
- if (DstReg != Dst)
- return false;
- // Registers match, do the subregisters line up?
- return TRI.composeSubRegIndices(SrcIdx, SrcSub) ==
- TRI.composeSubRegIndices(DstIdx, DstSub);
}
+
+ // DstReg is virtual.
+ if (DstReg != Dst)
+ return false;
+ // Registers match, do the subregisters line up?
+ return TRI.composeSubRegIndices(SrcIdx, SrcSub) ==
+ TRI.composeSubRegIndices(DstIdx, DstSub);
}
void RegisterCoalescerLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
@@ -2914,8 +2914,7 @@ JoinVals::ConflictResolution JoinVals::analyzeValue(unsigned ValNo,
if ((V.ValidLanes & OtherV.ValidLanes).any())
// Overlapping lanes can't be resolved.
return CR_Impossible;
- else
- return CR_Merge;
+ return CR_Merge;
}
// No simultaneous def. Is Other live at the def?
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/14625 Here is the relevant piece of the build log for the reference |

No description provided.