I've seen worse... far worse.
>>7Are you
sure it doesn't, sometime later in the function? Or is that
call esi
part of a loop? I know MSVC does the mov/call/call sequence for functions called more than once; so maybe it originally generated code for multiple calls, but some later optimisation pass decided those would never be reachable and removed them without considering the results of some earlier opts.
<rant>
This is another example of why that "separation of concerns" principle the academic dickheads like to trumpet around is pure intellectual masturbatory bullshit. One optimisation can affect another. Register allocation and instruction selection are intrinsically dependent, and also dependent on optimisation. Thinking of a compiler as a series of stages from source code to executable binary is conceptually simple and produces something that works, but is far from optimal.
</rant>