From 2623df180b9e86512fe69b8f90563fbd8add89c3 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Fri, 28 Aug 2026 23:59:37 +0800 Subject: [CodeGen] Complete LaneMask bitwise operations --- backend/lib/CodeGen/LiveIntervals.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'backend/lib/CodeGen/LiveIntervals.cpp') diff --git a/backend/lib/CodeGen/LiveIntervals.cpp b/backend/lib/CodeGen/LiveIntervals.cpp index 5a01693..dc25af8 100644 --- a/backend/lib/CodeGen/LiveIntervals.cpp +++ b/backend/lib/CodeGen/LiveIntervals.cpp @@ -23,10 +23,6 @@ namespace rcc { namespace { -[[nodiscard]] LaneMask subtractLanes(LaneMask Left, LaneMask Right) noexcept { - return LaneMask::fromRaw(Left.rawValue() & ~Right.rawValue()); -} - [[nodiscard]] bool maskIntersects(LaneMask Access, std::optional Filter) noexcept { return !Filter || Access.intersects(*Filter); } @@ -242,7 +238,7 @@ partitionVirtualRegisterLanes(Register Reg, MachineFunction &Function, std::vector Refined; for (const LaneMask Group : Groups) { const LaneMask Intersection = Group & Access; - const LaneMask Difference = subtractLanes(Group, Access); + const LaneMask Difference = Group & ~Access; if (!Intersection.empty()) Refined.push_back(Intersection); if (!Difference.empty()) -- cgit v1.2.3