aco/ra: fix intersects()

The previous implementation failed when a contained b.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12836>
This commit is contained in:
Daniel Schürmann 2021-06-21 16:36:28 +02:00 committed by Marge Bot
parent 9ea0351660
commit 5afcc17f50

View file

@ -153,7 +153,7 @@ struct PhysRegInterval {
bool
intersects(const PhysRegInterval& a, const PhysRegInterval& b)
{
return ((a.lo() >= b.lo() && a.lo() < b.hi()) || (a.hi() > b.lo() && a.hi() <= b.hi()));
return a.hi() > b.lo() && b.hi() > a.lo();
}
/* Gets the stride for full (non-subdword) registers */