From 5afcc17f50bf32c9664a6ee000916ea17d755727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 21 Jun 2021 16:36:28 +0200 Subject: [PATCH] aco/ra: fix intersects() The previous implementation failed when a contained b. Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 9766dfc3151..b96ea9c3798 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -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 */