You can just write the benchmark in such a way that the optimizations are not possible.