[llvm] 97187e1 - [AArch64] update "rm" inline asm test (#67472)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 08:30:41 PDT 2023


Author: Nick Desaulniers
Date: 2023-09-27T08:30:36-07:00
New Revision: 97187e127881a68c37ee5a058d59524f0bd4c08a

URL: https://github.com/llvm/llvm-project/commit/97187e127881a68c37ee5a058d59524f0bd4c08a
DIFF: https://github.com/llvm/llvm-project/commit/97187e127881a68c37ee5a058d59524f0bd4c08a.diff

LOG: [AArch64] update "rm" inline asm test (#67472)

Because `x0` is not listed in the clobber list, regalloc could (one day
when #20571 is fixed) allocate `$0` to `x0`:

  ldr x0, x0

This will produce an error when validating the instruction. The intent
of this test FWICT is to check that the parameter in w0 is stored to a
stack slot using w0, since this target triple is the exotic arm64_32
(ILP32). Update the test to simply use "m" constraint. The clobber list
is underconstrained otherwise.

Added: 
    

Modified: 
    llvm/test/CodeGen/AArch64/arm64_32.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/arm64_32.ll b/llvm/test/CodeGen/AArch64/arm64_32.ll
index d3b30d398ffcc3c..16e2e84a14329d1 100644
--- a/llvm/test/CodeGen/AArch64/arm64_32.ll
+++ b/llvm/test/CodeGen/AArch64/arm64_32.ll
@@ -649,7 +649,7 @@ define <2 x ptr> @test_pointer_vec_load(ptr %addr) {
 define void @test_inline_asm_mem_pointer(ptr %in) {
 ; CHECK-LABEL: test_inline_asm_mem_pointer:
 ; CHECK: str w0,
-  tail call void asm sideeffect "ldr x0, $0", "rm"(ptr %in)
+  tail call void asm sideeffect "ldr x0, $0", "m"(ptr %in)
   ret void
 }
 


        


More information about the llvm-commits mailing list