Perform some trivial branch folding.