Phi function
The pretend instruction in SSA form that picks a value depending on which control-flow path led into the block.
When two branches both assign the same variable, SSA gives them separate names, x1 and x2, and something has to say which one is live after the merge. That something is x3 = φ(x1, x2), sitting at the top of the join block. Cytron, Ferrante, Rosen, Wegman and Zadeck showed in 1991 that the right places to insert them are the dominance frontiers, which makes construction close to linear in practice.
All the φs in a block are evaluated simultaneously, not one after another — an irrelevant detail right up until it isn't. In LLVM IR, phi is a real instruction that must come first in its block. Newer IRs such as MLIR, Swift SIL and Cranelift use block arguments instead: the branch passes the value as a parameter, which is the same idea with less ceremony. Before code generation, all of it is replaced by ordinary copies.