I understand what you are saying, I just do not understand how to do this at 
runtime. Maybe I am just missing something, but could you explain it to me in 
more detail?

Assume your plan works out. You have a binary executable, which contains a 
sequence of machine codes. Do the AVX machine instructions ever appear in this 
executable? What if you run this on a processor that does not support AVX 
operations? You seem to say that the code path will never touch this part of 
code, but is the generated executable even valid?

You mention that C# does this with a JIT - the JIT can just avoid to even 
generate AVX instructions if they are not supported. But with AOT you have to 
generate all code in advance

Reply via email to