CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
479 lines
14 KiB
LLVM
479 lines
14 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -O3 -mtriple=riscv32 -mattr=+a -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck -check-prefixes=RV32 %s
|
|
; RUN: llc -O3 -mtriple=riscv64 -mattr=+a -verify-machineinstrs < %s \
|
|
; RUN: | FileCheck -check-prefixes=RV64 %s
|
|
|
|
define void @amoswap_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amoswap_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amoswap.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoswap_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoswap.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw xchg ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoswap_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amoswap_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -16
|
|
; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: li a3, 5
|
|
; RV32-NEXT: call __atomic_exchange_8
|
|
; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 16
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoswap_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoswap.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw xchg ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoadd_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amoadd_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amoadd.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoadd_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoadd.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw add ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoadd_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amoadd_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -16
|
|
; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: li a3, 5
|
|
; RV32-NEXT: call __atomic_fetch_add_8
|
|
; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 16
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoadd_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoadd.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw add ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoand_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amoand_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amoand.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoand_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoand.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw and ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoand_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amoand_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -16
|
|
; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: li a3, 5
|
|
; RV32-NEXT: call __atomic_fetch_and_8
|
|
; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 16
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoand_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoand.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw and ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoor_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amoor_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amoor.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoor_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoor.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw or ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoor_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amoor_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -16
|
|
; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: li a3, 5
|
|
; RV32-NEXT: call __atomic_fetch_or_8
|
|
; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 16
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoor_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoor.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw or ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoxor_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amoxor_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amoor.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoxor_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoor.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw or ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amoxor_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amoxor_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -16
|
|
; RV32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: li a3, 5
|
|
; RV32-NEXT: call __atomic_fetch_or_8
|
|
; RV32-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 16
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amoxor_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amoor.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw or ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomax_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amomax_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amomax.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomax_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomax.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw max ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomax_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amomax_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -32
|
|
; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: mv s0, a2
|
|
; RV32-NEXT: mv s1, a1
|
|
; RV32-NEXT: mv s2, a0
|
|
; RV32-NEXT: li a1, 0
|
|
; RV32-NEXT: call __atomic_load_8
|
|
; RV32-NEXT: mv a4, a0
|
|
; RV32-NEXT: j .LBB11_2
|
|
; RV32-NEXT: .LBB11_1: # %select.end
|
|
; RV32-NEXT: # in Loop: Header=BB11_2 Depth=1
|
|
; RV32-NEXT: sw a4, 8(sp)
|
|
; RV32-NEXT: sw a1, 12(sp)
|
|
; RV32-NEXT: addi a1, sp, 8
|
|
; RV32-NEXT: li a4, 5
|
|
; RV32-NEXT: li a5, 5
|
|
; RV32-NEXT: mv a0, s2
|
|
; RV32-NEXT: call __atomic_compare_exchange_8
|
|
; RV32-NEXT: lw a4, 8(sp)
|
|
; RV32-NEXT: lw a1, 12(sp)
|
|
; RV32-NEXT: bnez a0, .LBB11_6
|
|
; RV32-NEXT: .LBB11_2: # %atomicrmw.start
|
|
; RV32-NEXT: # =>This Inner Loop Header: Depth=1
|
|
; RV32-NEXT: beq a1, s0, .LBB11_4
|
|
; RV32-NEXT: # %bb.3: # %atomicrmw.start
|
|
; RV32-NEXT: # in Loop: Header=BB11_2 Depth=1
|
|
; RV32-NEXT: slt a0, s0, a1
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: bnez a0, .LBB11_1
|
|
; RV32-NEXT: j .LBB11_5
|
|
; RV32-NEXT: .LBB11_4: # in Loop: Header=BB11_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s1, a4
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: bnez a0, .LBB11_1
|
|
; RV32-NEXT: .LBB11_5: # %select.false
|
|
; RV32-NEXT: # in Loop: Header=BB11_2 Depth=1
|
|
; RV32-NEXT: mv a2, s1
|
|
; RV32-NEXT: mv a3, s0
|
|
; RV32-NEXT: j .LBB11_1
|
|
; RV32-NEXT: .LBB11_6: # %atomicrmw.end
|
|
; RV32-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 32
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomax_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomax.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw max ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomaxu_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amomaxu_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amomaxu.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomaxu_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomaxu.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw umax ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomaxu_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amomaxu_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -32
|
|
; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: mv s0, a2
|
|
; RV32-NEXT: mv s1, a1
|
|
; RV32-NEXT: mv s2, a0
|
|
; RV32-NEXT: li a1, 0
|
|
; RV32-NEXT: call __atomic_load_8
|
|
; RV32-NEXT: mv a4, a0
|
|
; RV32-NEXT: j .LBB13_2
|
|
; RV32-NEXT: .LBB13_1: # %select.end
|
|
; RV32-NEXT: # in Loop: Header=BB13_2 Depth=1
|
|
; RV32-NEXT: sw a4, 8(sp)
|
|
; RV32-NEXT: sw a1, 12(sp)
|
|
; RV32-NEXT: addi a1, sp, 8
|
|
; RV32-NEXT: li a4, 5
|
|
; RV32-NEXT: li a5, 5
|
|
; RV32-NEXT: mv a0, s2
|
|
; RV32-NEXT: call __atomic_compare_exchange_8
|
|
; RV32-NEXT: lw a4, 8(sp)
|
|
; RV32-NEXT: lw a1, 12(sp)
|
|
; RV32-NEXT: bnez a0, .LBB13_6
|
|
; RV32-NEXT: .LBB13_2: # %atomicrmw.start
|
|
; RV32-NEXT: # =>This Inner Loop Header: Depth=1
|
|
; RV32-NEXT: beq a1, s0, .LBB13_4
|
|
; RV32-NEXT: # %bb.3: # %atomicrmw.start
|
|
; RV32-NEXT: # in Loop: Header=BB13_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s0, a1
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: bnez a0, .LBB13_1
|
|
; RV32-NEXT: j .LBB13_5
|
|
; RV32-NEXT: .LBB13_4: # in Loop: Header=BB13_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s1, a4
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: bnez a0, .LBB13_1
|
|
; RV32-NEXT: .LBB13_5: # %select.false
|
|
; RV32-NEXT: # in Loop: Header=BB13_2 Depth=1
|
|
; RV32-NEXT: mv a2, s1
|
|
; RV32-NEXT: mv a3, s0
|
|
; RV32-NEXT: j .LBB13_1
|
|
; RV32-NEXT: .LBB13_6: # %atomicrmw.end
|
|
; RV32-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 32
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomaxu_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomaxu.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw umax ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomin_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amomin_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amomin.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomin_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomin.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw min ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amomin_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amomin_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -32
|
|
; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: mv s0, a2
|
|
; RV32-NEXT: mv s1, a1
|
|
; RV32-NEXT: mv s2, a0
|
|
; RV32-NEXT: li a1, 0
|
|
; RV32-NEXT: call __atomic_load_8
|
|
; RV32-NEXT: mv a4, a0
|
|
; RV32-NEXT: j .LBB15_2
|
|
; RV32-NEXT: .LBB15_1: # %select.end
|
|
; RV32-NEXT: # in Loop: Header=BB15_2 Depth=1
|
|
; RV32-NEXT: sw a4, 8(sp)
|
|
; RV32-NEXT: sw a1, 12(sp)
|
|
; RV32-NEXT: addi a1, sp, 8
|
|
; RV32-NEXT: li a4, 5
|
|
; RV32-NEXT: li a5, 5
|
|
; RV32-NEXT: mv a0, s2
|
|
; RV32-NEXT: call __atomic_compare_exchange_8
|
|
; RV32-NEXT: lw a4, 8(sp)
|
|
; RV32-NEXT: lw a1, 12(sp)
|
|
; RV32-NEXT: bnez a0, .LBB15_6
|
|
; RV32-NEXT: .LBB15_2: # %atomicrmw.start
|
|
; RV32-NEXT: # =>This Inner Loop Header: Depth=1
|
|
; RV32-NEXT: beq a1, s0, .LBB15_4
|
|
; RV32-NEXT: # %bb.3: # %atomicrmw.start
|
|
; RV32-NEXT: # in Loop: Header=BB15_2 Depth=1
|
|
; RV32-NEXT: slt a0, s0, a1
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: beqz a0, .LBB15_1
|
|
; RV32-NEXT: j .LBB15_5
|
|
; RV32-NEXT: .LBB15_4: # in Loop: Header=BB15_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s1, a4
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: beqz a0, .LBB15_1
|
|
; RV32-NEXT: .LBB15_5: # %select.false
|
|
; RV32-NEXT: # in Loop: Header=BB15_2 Depth=1
|
|
; RV32-NEXT: mv a2, s1
|
|
; RV32-NEXT: mv a3, s0
|
|
; RV32-NEXT: j .LBB15_1
|
|
; RV32-NEXT: .LBB15_6: # %atomicrmw.end
|
|
; RV32-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 32
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amomin_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amomin.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw min ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amominu_w_discard(ptr %a, i32 %b) nounwind {
|
|
; RV32-LABEL: amominu_w_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: amominu.w.aqrl zero, a1, (a0)
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amominu_w_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amominu.w.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw umin ptr %a, i32 %b seq_cst
|
|
ret void
|
|
}
|
|
|
|
define void @amominu_d_discard(ptr %a, i64 %b) nounwind {
|
|
; RV32-LABEL: amominu_d_discard:
|
|
; RV32: # %bb.0:
|
|
; RV32-NEXT: addi sp, sp, -32
|
|
; RV32-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
|
|
; RV32-NEXT: mv s0, a2
|
|
; RV32-NEXT: mv s1, a1
|
|
; RV32-NEXT: mv s2, a0
|
|
; RV32-NEXT: li a1, 0
|
|
; RV32-NEXT: call __atomic_load_8
|
|
; RV32-NEXT: mv a4, a0
|
|
; RV32-NEXT: j .LBB17_2
|
|
; RV32-NEXT: .LBB17_1: # %select.end
|
|
; RV32-NEXT: # in Loop: Header=BB17_2 Depth=1
|
|
; RV32-NEXT: sw a4, 8(sp)
|
|
; RV32-NEXT: sw a1, 12(sp)
|
|
; RV32-NEXT: addi a1, sp, 8
|
|
; RV32-NEXT: li a4, 5
|
|
; RV32-NEXT: li a5, 5
|
|
; RV32-NEXT: mv a0, s2
|
|
; RV32-NEXT: call __atomic_compare_exchange_8
|
|
; RV32-NEXT: lw a4, 8(sp)
|
|
; RV32-NEXT: lw a1, 12(sp)
|
|
; RV32-NEXT: bnez a0, .LBB17_6
|
|
; RV32-NEXT: .LBB17_2: # %atomicrmw.start
|
|
; RV32-NEXT: # =>This Inner Loop Header: Depth=1
|
|
; RV32-NEXT: beq a1, s0, .LBB17_4
|
|
; RV32-NEXT: # %bb.3: # %atomicrmw.start
|
|
; RV32-NEXT: # in Loop: Header=BB17_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s0, a1
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: beqz a0, .LBB17_1
|
|
; RV32-NEXT: j .LBB17_5
|
|
; RV32-NEXT: .LBB17_4: # in Loop: Header=BB17_2 Depth=1
|
|
; RV32-NEXT: sltu a0, s1, a4
|
|
; RV32-NEXT: mv a2, a4
|
|
; RV32-NEXT: mv a3, a1
|
|
; RV32-NEXT: beqz a0, .LBB17_1
|
|
; RV32-NEXT: .LBB17_5: # %select.false
|
|
; RV32-NEXT: # in Loop: Header=BB17_2 Depth=1
|
|
; RV32-NEXT: mv a2, s1
|
|
; RV32-NEXT: mv a3, s0
|
|
; RV32-NEXT: j .LBB17_1
|
|
; RV32-NEXT: .LBB17_6: # %atomicrmw.end
|
|
; RV32-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
|
|
; RV32-NEXT: addi sp, sp, 32
|
|
; RV32-NEXT: ret
|
|
;
|
|
; RV64-LABEL: amominu_d_discard:
|
|
; RV64: # %bb.0:
|
|
; RV64-NEXT: amominu.d.aqrl zero, a1, (a0)
|
|
; RV64-NEXT: ret
|
|
%1 = atomicrmw umin ptr %a, i64 %b seq_cst
|
|
ret void
|
|
}
|