[llvm-branch-commits] [llvm] [AArch64] Consider MOVaddr* as cheap if fuse-adrp-add (PR #121904)

Guy David via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 26 04:27:02 PST 2026


================
@@ -4234,9 +4234,10 @@ define dso_local void @test_atomic_cmpxchg_i64(i64 %wanted, i64 %new) nounwind {
 ; OUTLINE_ATOMICS-LABEL: test_atomic_cmpxchg_i64:
 ; OUTLINE_ATOMICS:       // %bb.0:
 ; OUTLINE_ATOMICS-NEXT:    stp x30, x19, [sp, #-16]! // 16-byte Folded Spill
+; OUTLINE_ATOMICS-NEXT:    adrp x2, var64
+; OUTLINE_ATOMICS-NEXT:    add x2, x2, :lo12:var64
 ; OUTLINE_ATOMICS-NEXT:    adrp x19, var64
 ; OUTLINE_ATOMICS-NEXT:    add x19, x19, :lo12:var64
-; OUTLINE_ATOMICS-NEXT:    mov x2, x19
----------------
guy-david wrote:

Created https://github.com/llvm/llvm-project/pull/183503 and https://github.com/llvm/llvm-project/pull/183506 so it would be possible to reason about the size of the pseudo-instructions, the cleanup itself is in the works.

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


More information about the llvm-branch-commits mailing list