Code generation in VS 2019

  • Thread starter Thread starter Neill Clift
  • Start date Start date
N

Neill Clift

Guest
I see the following instructions generated in VS 2019:

00007FF6380350D6 cmp edx,7FFFFFFFh
00007FF6380350DC jg EnumerateSolutions+241h (07FF638035141h)

So comparisons against int_max for example are not optimized away? I think I have seen the unsigned equivalent optimized away.

With the new shift instructions I see stuff like this:

Limit = (Limit >> b) << b;

00007FF773F151E2 mov eax,r8d
00007FF773F151E5 shrx rcx,rbx,rax <--- why not r8d directly?
00007FF773F151EA mov eax,r8d <---- why load again?
00007FF773F151ED shlx rcx,rcx,rax

Continue reading...
 
Back
Top