[llvm] Treat ';' and '\n' as assembly instruction separators in collectAsmInstrs (PR #149365)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 13:51:29 PDT 2025


================
@@ -7,10 +7,9 @@ define ptr @foo(ptr %Ptr) {
   %Ptr.addr = alloca ptr, align 8
   store ptr %Ptr, ptr %Ptr.addr, align 8
 ; CHECK: movq    %rdi, -8(%rsp)
-  %1 = tail call ptr asm "mov $1, $0\0A\09lea $2, $0", "=r,p,*m,~{dirflag},~{fpsr},~{flags}"(ptr %Ptr, ptr elementtype(ptr) %Ptr.addr)
----------------
mingmingl-llvm wrote:

The `\0A\09` is in the original test case so it'd be good to keep them for test coverage.

To test new cases (`;` or `# some comment` in llvm/test/Transforms/Inline/inline-call-with-asm-call.ll), what do you think of adding new functions instead of changing existing ones in place?

https://github.com/llvm/llvm-project/pull/149365


More information about the llvm-commits mailing list