<div dir="ltr">Hi all,<div><br></div><div>I've got an interesting AsmLexer failure (originally found as a breakage post-<a href="https://reviews.llvm.org/D87400">D87400</a>, now reverted). <a href="https://github.com/llvm/llvm-project/blob/a36ddf0aa9db5c1086e04f56b5f077b761712eb5/clang/test/CodeGen/ms-inline-asm-avx512.c#L26-L27">ms-inline-asm-avx512.c</a> includes the line:</div><div><font face="monospace">__asm vaddps xmm1, xmm2, [c]{1to4}</font></div><div><br></div><div>The trouble is: MASM doesn't use the {1toX} syntax for the AVX-512 instructions. Instead, they implemented a "bcst" keyword, which would roughly apply as:</div><div><span style="color:rgba(0,0,0,0.87)"><font face="monospace" style="">__asm vaddps xmm1, xmm2, dword bcst [c]</font></span><br></div><div>See <a href="https://devblogs.microsoft.com/cppblog/microsoft-visual-studio-2017-supports-intel-avx-512/#embedded-broadcast">https://devblogs.microsoft.com/cppblog/microsoft-visual-studio-2017-supports-intel-avx-512/#embedded-broadcast</a><br></div><div></div><div><br></div><div>Can we remove support for the {1toX} syntax in MASM contexts, or do we need to keep it until we can implement "bcst" support?</div><div><br></div><div>Context:</div><div><br></div><div>The current implementation (before my change) doesn't support this "bcst" keyword, so it isn't actually following MASM - but no one noticed. x64 MSVC doesn't allow inline assembly, so there's nothing to compare to in that context.</div><div><br></div><div>The problem: I'm trying to add support for full MASM-style integer literals in our inline assembly when targeting MSVC compatibility (or at least in the upcoming LLVM-ML project). The "1to4" syntax conflicts with that, as "1t" gets lexed as an integer literal, with the "t" recognized as a decimal radix specifier. We can special-case that away by checking for an "o" following the "t", but that might have false positives.</div><div><br></div><div>Thanks,</div><div>- Eric</div></div>