Although they don't include the exact case of argument, these slides show a very similar example of how it's mostly useless to try to outsmart the compiler in such simple optimizations. The most similar case, IMO, is the bounds check. Check them out.
http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner....