aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineLiveness.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineLiveness.cpp')
-rw-r--r--backend/lib/CodeGen/MachineLiveness.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/backend/lib/CodeGen/MachineLiveness.cpp b/backend/lib/CodeGen/MachineLiveness.cpp
index b3d88cd..327ae7d 100644
--- a/backend/lib/CodeGen/MachineLiveness.cpp
+++ b/backend/lib/CodeGen/MachineLiveness.cpp
@@ -1662,10 +1662,9 @@ LiveIntervalsAnalysis::run(MachineFunction &Function, const TargetDescription &T
auto Info = Function.registerInfo().virtualRegisterInfo(Reg);
if (!Info)
return std::unexpected(Info.error());
+ // Preserve the target-provided hint order. MachineRegisterInfo already de-duplicates
+ // hints, and their order is the deterministic preference order consumed by allocators.
Interval.AllocationHints = Info->get().AllocationHints;
- std::ranges::sort(Interval.AllocationHints, [](PhysicalRegister Left, PhysicalRegister Right) {
- return Left.number() < Right.number();
- });
std::uint64_t Weight = 1;
for (const MachineOperand &Operand : Function.registerInfo().useOperands(Reg, false)) {