Microsoft compiler performs “relaxation” of the X86 instructions and expands the set of legal instruction forms that can be used in the X86 inline assembly.
Microsoft achieves this by transforming instructions that have an illegal form according to X86 spec into a legal one.
For example, the illegal instruction form:
mov r16, m32
Is transformed into the following legal form (based on the type of the register operand):
mov r16, m16
There are many instructions that have such “relaxations” and they are all needed in order for llvm to be consistent with Microsoft compiler.
I think the right condition here is not "are we targeting Windows" but "are we parsing Intel inline assembly".