improve handling of phi node to support phi nodes with constant values