Reland "[X86][MS-InlineAsm] Use exact conditions to recognize MS global variables"
authorPhoebe Wang <phoebe.wang@intel.com>
Fri, 24 Dec 2021 09:12:56 +0000 (17:12 +0800)
committerPhoebe Wang <phoebe.wang@intel.com>
Fri, 24 Dec 2021 09:42:51 +0000 (17:42 +0800)
commit24c68ea1eb4fc0d0e782424ddb02da9e8c53ddf5
tree30c88b5b8d9e74015629df2e96a63e2c4881ef4e
parent034e66e76c6f0f76aa7c67ba4edf4eba108bcf51
Reland "[X86][MS-InlineAsm] Use exact conditions to recognize MS global variables"

This reverts commit a954558e878ed9e97e99036229e99af8c6b6c881.

Thanks Yuanfang's help. I think I found the root cause of the buildbot
fail.

The failed test has both Memory and Immediate X86Operand. All data of
different operand kinds share the same memory space by a union
definition. So it has chance we get the wrong result if we don't check
the operand kind.

It's probably it happen to be the correct value in my local environment
so that I can't reproduce the fail.

Differential Revision: https://reviews.llvm.org/D116090
clang/test/CodeGen/ms-inline-asm-functions.c
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/lib/Target/X86/AsmParser/X86Operand.h