This asm instruction passes compilation:
mov eax, flags2
This asm instruction fails compilation:
mov eax, flags
When parsing the latter, the X86AsmParser “flags” should be matched to a memory location and not to the implicit EFLAGS register.
Test case uploaded in review:
http://reviews.llvm.org/D11513