The obvious way to compile a while-loop is with a conditional branch at the start and an unconditional branch at the end to loop back. Suppose the condition is A>B, then a conditional branch at the end testing A<=B will fall through when the loop is done, instead of jumping back, testing A>B and then jumping to the code following the loop.
I ran a test using gfortran (because Fortran allows goto) and my test code using 'do while's ran about 7 or 8% slower than equivalent code using an 'if' and a 'goto' at the start of the loop, and another 'if' and 'goto' at the end of the loop. The code inside the loop just adds or subtracts 1 to a count, to provide a check that the two versions really are equivalent (rather oddly, the result was quite often 42).
Both versions had 6KB object files, presumably if a source had enough loops then the double-conditional version would be detectably bigger.
Is the difference in speed what you would expect?
Would you usually expect a compiler to only put a conditional branch at the start of a while-loop (in any language)?