diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 6bb3e612..f907ff64 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -1929,13 +1929,6 @@ bool RTLIL::SigSpec::operator ==(const RTLIL::SigSpec &other) const
 	return true;
 }
 
-bool RTLIL::SigSpec::operator !=(const RTLIL::SigSpec &other) const
-{
-	if (*this == other)
-		return false;
-	return true;
-}
-
 bool RTLIL::SigSpec::is_fully_const() const
 {
 	pack();
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 83214659..80007ab8 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -575,7 +575,7 @@ public:
 
 	bool operator <(const RTLIL::SigSpec &other) const;
 	bool operator ==(const RTLIL::SigSpec &other) const;
-	bool operator !=(const RTLIL::SigSpec &other) const;
+	inline bool operator !=(const RTLIL::SigSpec &other) const { return !(*this == other); }
 
 	bool is_fully_const() const;
 	bool is_fully_def() const;