aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'backend/include/rcc/CodeGen')
-rw-r--r--backend/include/rcc/CodeGen/MachineIRTypes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MachineIRTypes.h b/backend/include/rcc/CodeGen/MachineIRTypes.h
index 66369e0..abd547e 100644
--- a/backend/include/rcc/CodeGen/MachineIRTypes.h
+++ b/backend/include/rcc/CodeGen/MachineIRTypes.h
@@ -173,6 +173,20 @@ public:
return RawValue;
}
+ [[nodiscard]] constexpr LaneMask operator~() const noexcept {
+ return LaneMask(~RawValue);
+ }
+
+ constexpr LaneMask &operator|=(LaneMask Other) noexcept {
+ RawValue |= Other.RawValue;
+ return *this;
+ }
+
+ constexpr LaneMask &operator&=(LaneMask Other) noexcept {
+ RawValue &= Other.RawValue;
+ return *this;
+ }
+
friend constexpr bool operator==(LaneMask Left, LaneMask Right) noexcept = default;
friend constexpr LaneMask operator|(LaneMask Left, LaneMask Right) noexcept {