nir/phi-builder: Set the value in the block when creating a phi

After we figure out the value that we are going to return, we have a
loop that walks up the dominance tree and sets the value in each of the
blocks that doesn't have one yet.  In the case of the phi, the def is
set to NEEDS_PHI not NULL, so the last one where the phi node actually
goes never gets filled out.  This can lead to duplicating the phi node
unnecessarily.
1 file changed