================
@@ -0,0 +1,38 @@
+; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu
-stop-after=inline-asm-prepare < %s | FileCheck %s
+
+define void @test1(i32 %x) {
+; CHECK-LABEL: @test1
+; CHECK: %asm_mem = alloca i32
+; CHECK-NEXT: store i32 %x, ptr %asm_mem
+; CHECK-NEXT: %0 = call i32 asm sideeffect "mov $1, $0",
"=r,rm,~{dirflag},~{fpsr},~{flags}"(ptr %asm_mem)
----------------
nikic wrote:
Sorry, I'm not super familiar with how the constraint handling works right now,
and I'm a bit confused by what is going on here. As far as I can tell, the
constraint string here stays the same, but we switch from an `i32` arg to a
`ptr` arg. But how does the backend know about that? After all a pointer could
also be for the `r` constraint, right? How are these distinguished?
https://github.com/llvm/llvm-project/pull/92040
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits