reassoc: fix infinite loop during reassociation

The infinite loop is triggered by some fairly simple code on Zephyr and is
caused by some exchange of pseudos done without checking the canonical order.

Fix this by adding the check for the canonical order.
Also use can_move_to() instead of the simpler one_use() to check the dominance
of the moved pseudos.

Reported-by: Marc Herbert <>
Signed-off-by: Luc Van Oostenryck <>
2 files changed