mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-17 12:58:29 +00:00
MachineSink: Fix strict weak ordering in GetAllSortedSuccessors
CodeGen/X86/pseudo_cmov_lower2.ll fails using libc++ debug mode (D150264) without this change. Reviewed By: MaskRay, aeubanks Differential Revision: https://reviews.llvm.org/D155811
This commit is contained in:
parent
bf8cce60c6
commit
49d41de578
@ -915,7 +915,7 @@ MachineSinking::GetAllSortedSuccessors(MachineInstr &MI, MachineBasicBlock *MBB,
|
||||
AllSuccs, [this](const MachineBasicBlock *L, const MachineBasicBlock *R) {
|
||||
uint64_t LHSFreq = MBFI ? MBFI->getBlockFreq(L).getFrequency() : 0;
|
||||
uint64_t RHSFreq = MBFI ? MBFI->getBlockFreq(R).getFrequency() : 0;
|
||||
bool HasBlockFreq = LHSFreq != 0 && RHSFreq != 0;
|
||||
bool HasBlockFreq = LHSFreq != 0 || RHSFreq != 0;
|
||||
return HasBlockFreq ? LHSFreq < RHSFreq
|
||||
: CI->getCycleDepth(L) < CI->getCycleDepth(R);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user