Control dependency
When an instruction's execution depends on the outcome of a prior conditional branch, potentially affecting memory ordering guarantees between threads.
Control dependencies arise when a CPU must wait for a conditional branch result (if, while) before executing instructions in the following branch. Unlike data dependencies, which provide strong ordering guarantees, control dependencies are often weaker. A speculative CPU can execute instructions from both branches and discard one if the prediction was wrong.
On weak memory models like ARM and PowerPC, a control dependency on a read does not guarantee that a subsequent write will be visible before changes from other threads — a subtle issue often overlooked. Explicit memory barriers may be required to ensure correct ordering.