Don't second guess a modern java compiler unless you know exactly what you are doing. This not only applies to simple math like you question, but everything. E.g.: like flow control.
People waaaaay smarter than us have put lots of effort into making it all super fast.