Technically, if you change your content based on the IPs or user agents visiting that piece of content, specifically giving GoogleBot different content than your users, that would be against Google’s cloaking policy and warrant a Google penalty. But based on the intent of that change, most likely, you won’t be penalized.