Improve rewrite reason.
Remove unused _if primitive.
Rewrite if test is constant.
Clean up.