return bitset_next_set(tmp, 0);
}
-static bitset_t const *get_decisive_partner_regs(const be_operand_t *o1, const be_operand_t *o2)
+static bitset_t const *get_decisive_partner_regs(be_operand_t const *const o1)
{
- if (!o2)
- return o1->regs;
-
- assert(o1->req->cls == o2->req->cls);
+ be_operand_t const *const o2 = o1->partner;
+ assert(!o2 || o1->req->cls == o2->req->cls);
- if (bitset_contains(o1->regs, o2->regs)) {
+ if (!o2 || bitset_contains(o1->regs, o2->regs)) {
return o1->regs;
} else if (bitset_contains(o2->regs, o1->regs)) {
return o2->regs;
DBG((dbg, LEVEL_2, "\tassociating %+F and %+F\n", op->carrier,
partner));
- bitset_t const *const bs = get_decisive_partner_regs(op, op->partner);
+ bitset_t const *const bs = get_decisive_partner_regs(op);
if (bs) {
DBG((dbg, LEVEL_2, "\tallowed registers for %+F: %B\n", op->carrier, bs));