[llvm] [BOLT][AArch64] Fix adr-relaxation.s test (PR #143151)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 07:51:31 PDT 2025


https://github.com/paschalis-mpeis created https://github.com/llvm/llvm-project/pull/143151

On some AArch64 machines the cold `foo` had a `mov` instruction before adrp.

```
<foo.cold.0>:
      mov     x0, #0x0                // =0
      adrp    x1, 0x600000 <_start>
      add     x1, x1, #0x14
      ret
```

>From 528bae4bf2ea6b0c3148fd51a0fa5d33cfdac231 Mon Sep 17 00:00:00 2001
From: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
Date: Fri, 6 Jun 2025 15:37:24 +0100
Subject: [PATCH] [BOLT][AArch64] Fix adr-relaxation.s test

On some AArch64 machines the cold `foo` had a `mov` instruction before adrp.

```
<foo.cold.0>:
      mov     x0, #0x0                // =0
      adrp    x1, 0x600000 <_start>
      add     x1, x1, #0x14
      ret
```
---
 bolt/test/AArch64/adr-relaxation.s | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bolt/test/AArch64/adr-relaxation.s b/bolt/test/AArch64/adr-relaxation.s
index a643a62339ba3..b96ae0aba383c 100644
--- a/bolt/test/AArch64/adr-relaxation.s
+++ b/bolt/test/AArch64/adr-relaxation.s
@@ -37,7 +37,7 @@ foo:
   mov  x0, #0x0
 .L2:
 # CHECK-FOO: <foo.cold.0>:
-# CHECK-FOO-NEXT: adrp
+# CHECK-FOO: adrp
 # CHECK-FOO-NEXT: add
   adr x1, foo
   ret  x30



More information about the llvm-commits mailing list