No, optimizations are not deterministic. Even if you run the same single-threaded, fully deterministic program, the sampler is used by JIT to determine which optimization methods a different set may choose.
Another thing that can change the generated machine code is the actual memory location of certain constants that the code refers to. JIT can issue machine instructions that directly access these memory locations, which leads to additional differences between machine code on different passes.
Researchers using Jikes RVM have addressed this issue for their tests using the Compiler Repeat feature.
source share