[llvm] [ARM] Fix failure to register-allocate CMP_SWAP_64 pseudo-inst (PR #106721)
Simon Tatham via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 08:29:00 PDT 2024
================
@@ -78,15 +78,14 @@ define { i32, i1 } @test_cmpxchg_32(ptr %addr, i32 %desired, i32 %new) nounwind
define { i64, i1 } @test_cmpxchg_64(ptr %addr, i64 %desired, i64 %new) nounwind {
; CHECK-LABEL: test_cmpxchg_64:
-; CHECK: mov [[ADDR:r[0-9]+]], r0
; CHECK: dmb ish
; CHECK-NOT: uxt
; CHECK: [[RETRY:.LBB[0-9]+_[0-9]+]]:
-; CHECK: ldrexd [[OLDLO:r[0-9]+]], [[OLDHI:r[0-9]+]], [[[ADDR]]]
+; CHECK: ldrexd [[OLDLO:r[0-9]+]], [[OLDHI:r[0-9]+]], [r0]
; CHECK: cmp [[OLDLO]], r6
; CHECK: cmpeq [[OLDHI]], r7
; CHECK: bne [[DONE:.LBB[0-9]+_[0-9]+]]
-; CHECK: strexd [[STATUS:[lr0-9]+]], r8, r9, [r1]
----------------
statham-arm wrote:
This made me scratch my head when I was trying to work out how the new version matched up to it! I think the `[r1]` here should have been another `[[[ADDR]]]`, because in the real output, ADDR is r1 anyway. I suppose in the new version you do just expect the address to stay in r0, because there was no reason to move it.
https://github.com/llvm/llvm-project/pull/106721
More information about the llvm-commits
mailing list