__ses_xchg_cx2()
authoryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 10:18:43 +0000 (18:18 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 10:18:43 +0000 (18:18 +0800)
ses_layout.c

index 511fa498f97766abe330d47cc049f6c0c6f57167..3e98f3401a23b9deded33fb5f0cc76f18f4b0f59 100644 (file)
@@ -847,20 +847,12 @@ static inline void __ses_xchg_cx2(ScfEcomponent* c0, ScfEcomponent* c1)
 
        for (i = 0; i < c0->n_pins; i++) {
                p         = c0->pins[i];
-
-               if (i < 2)
-                       p->x = c0->x;
-               else
-                       p->x = c0->x - cx0;
+               p->x     += c0->x - cx0;
        }
 
        for (i = 0; i < c1->n_pins; i++) {
                p         = c1->pins[i];
-
-               if (i < 2)
-                       p->x = c1->x;
-               else
-                       p->x = c1->x - cx1;
+               p->x     += c1->x - cx1;
        }
 }