constant fold and fix arguments