-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…4960) * [AArch64] Fix incorrect regalloc constraints for atomic_cas (#4959) * [AArch64] Fix incorrect regalloc constraints for atomic_cas * Update test for latest Cranelift changes * Update precise-output test for 1.0.0 regalloc. Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; Regression test for incorrect regalloc constraints introduced in #4830 | ||
|
||
test compile precise-output | ||
target aarch64 | ||
|
||
function u0:0(i64, i32, i32) -> i8 system_v { | ||
block0(v0: i64, v1: i32, v2: i32): | ||
v6 = atomic_cas.i32 v0, v1, v2 | ||
v7 = icmp eq v6, v1 | ||
v8 = bint.i8 v7 | ||
return v8 | ||
} | ||
|
||
; stp fp, lr, [sp, #-16]! | ||
; mov fp, sp | ||
; str x28, [sp, #-16]! | ||
; stp x26, x27, [sp, #-16]! | ||
; stp x24, x25, [sp, #-16]! | ||
; block0: | ||
; mov x25, x0 | ||
; mov x9, x1 | ||
; mov x28, x2 | ||
; mov x26, x9 | ||
; atomic_cas_loop_32 addr=x25, expect=x26, replacement=x28, oldval=x27, scratch=x24 | ||
; subs wzr, w27, w26 | ||
; cset x8, eq | ||
; and w0, w8, #1 | ||
; ldp x24, x25, [sp], #16 | ||
; ldp x26, x27, [sp], #16 | ||
; ldr x28, [sp], #16 | ||
; ldp fp, lr, [sp], #16 | ||
; ret | ||
|