If we have
%p = phi [c1, pred1], [c2, pred2] %v = add %p, %op
We'll generate immediate materialization instructions in predecessors. We
can directly fold them into ALU instructions and create phi instruction for
the ALU results.
pred1: %op1 = add c1, %op br %bb pred2: %op2 = add c2, %op br %bb bb: %v = phi [%op1, pred1], [%op2, pred2]
clang-format: please reformat the code