Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Differential D143506 Diff 496932 llvm/test/CodeGen/AArch64/Atomics/aarch64-atomic-store-lse2_lse128.ll
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/AArch64/Atomics/aarch64-atomic-store-lse2_lse128.ll
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
; CHECK-LABEL: store_atomic_i128_aligned_unordered: | ; CHECK-LABEL: store_atomic_i128_aligned_unordered: | ||||
; CHECK: stp x0, x1, [x2] | ; CHECK: stp x0, x1, [x2] | ||||
store atomic i128 %value, ptr %ptr unordered, align 16 | store atomic i128 %value, ptr %ptr unordered, align 16 | ||||
ret void | ret void | ||||
} | } | ||||
define dso_local void @store_atomic_i128_aligned_monotonic(i128 %value, ptr %ptr) { | define dso_local void @store_atomic_i128_aligned_monotonic(i128 %value, ptr %ptr) { | ||||
; CHECK-LABEL: store_atomic_i128_aligned_monotonic: | ; CHECK-LABEL: store_atomic_i128_aligned_monotonic: | ||||
; CHECK: stp x0, x1, [x2] | ; CHECK: stp x0, x1, [x2] | ||||
lenary: I think in this case the `stp` is better, given it won't overwrite x0 and x1 - this doesn't… | |||||
store atomic i128 %value, ptr %ptr monotonic, align 16 | store atomic i128 %value, ptr %ptr monotonic, align 16 | ||||
ret void | ret void | ||||
} | } | ||||
define dso_local void @store_atomic_i128_aligned_release(i128 %value, ptr %ptr) { | define dso_local void @store_atomic_i128_aligned_release(i128 %value, ptr %ptr) { | ||||
; CHECK-LABEL: store_atomic_i128_aligned_release: | ; CHECK-LABEL: store_atomic_i128_aligned_release: | ||||
; CHECK: dmb ish | ; CHECK: swppl x0, x1, [x2] | ||||
; CHECK: stp x0, x1, [x2] | |||||
store atomic i128 %value, ptr %ptr release, align 16 | store atomic i128 %value, ptr %ptr release, align 16 | ||||
ret void | ret void | ||||
} | } | ||||
define dso_local void @store_atomic_i128_aligned_seq_cst(i128 %value, ptr %ptr) { | define dso_local void @store_atomic_i128_aligned_seq_cst(i128 %value, ptr %ptr) { | ||||
; CHECK-LABEL: store_atomic_i128_aligned_seq_cst: | ; CHECK-LABEL: store_atomic_i128_aligned_seq_cst: | ||||
; CHECK: dmb ish | ; CHECK: swppal x0, x1, [x2] | ||||
; CHECK: stp x0, x1, [x2] | |||||
; CHECK: dmb ish | |||||
store atomic i128 %value, ptr %ptr seq_cst, align 16 | store atomic i128 %value, ptr %ptr seq_cst, align 16 | ||||
ret void | ret void | ||||
} | } | ||||
define dso_local void @store_atomic_i8_unaligned_unordered(i8 %value, ptr %ptr) { | define dso_local void @store_atomic_i8_unaligned_unordered(i8 %value, ptr %ptr) { | ||||
; CHECK-LABEL: store_atomic_i8_unaligned_unordered: | ; CHECK-LABEL: store_atomic_i8_unaligned_unordered: | ||||
; CHECK: strb w0, [x1] | ; CHECK: strb w0, [x1] | ||||
store atomic i8 %value, ptr %ptr unordered, align 1 | store atomic i8 %value, ptr %ptr unordered, align 1 | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |
I think in this case the stp is better, given it won't overwrite x0 and x1 - this doesn't matter if the values in both are dead at this point, but if they're used by anything after the store, then with swpp they will need to be copied into a different register.