Cosmetic changes
[libfirm] / ir / adt / unionfind.h
index 055907d..9364d6b 100644 (file)
@@ -50,6 +50,9 @@ static INLINE int uf_union(int* data, int set1, int set2) {
        int d2 = data[set2];
        int newcount;
 
+       if(set1 == set2)
+               return 0;
+
        // need 2 set represantatives
        assert(d1 < 0 && d2 < 0);