[clang] [llvm] [RISCV][LLVM] Enable atomics for 'Zalrsc' (PR #163672)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 01:58:25 PDT 2025


================
@@ -29572,6 +36161,22 @@ define i32 @atomicrmw_umax_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; RV64I-NEXT:    addi sp, sp, 48
 ; RV64I-NEXT:    ret
 ;
+; RV64I-ZALRSC-LABEL: atomicrmw_umax_i32_monotonic:
+; RV64I-ZALRSC:       # %bb.0:
+; RV64I-ZALRSC-NEXT:  .LBB175_1: # =>This Inner Loop Header: Depth=1
+; RV64I-ZALRSC-NEXT:    lr.w a2, (a0)
+; RV64I-ZALRSC-NEXT:    slli a3, a2, 32
+; RV64I-ZALRSC-NEXT:    srli a3, a3, 32
+; RV64I-ZALRSC-NEXT:    bgeu a3, a1, .LBB175_3
----------------
slachowsky wrote:

Resolved in additional commit: f086abaecdc2caa9be687792f95b31c2a5eb36a0

Let me know if you dislike this approach, or want to squash this into the first commit.

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


More information about the cfe-commits mailing list