[llvm] [RISCV][GISel] Support Zalasr (PR #161774)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 13:45:24 PDT 2025


================
@@ -156,6 +165,26 @@ define i8 @atomic_load_i8_acquire(ptr %a) nounwind {
 ; RV64IA-TSO-TRAILING-FENCE:       # %bb.0:
 ; RV64IA-TSO-TRAILING-FENCE-NEXT:    lbu a0, 0(a0)
 ; RV64IA-TSO-TRAILING-FENCE-NEXT:    ret
+;
+; RV32IA-ZALASR-WMO-LABEL: atomic_load_i8_acquire:
+; RV32IA-ZALASR-WMO:       # %bb.0:
+; RV32IA-ZALASR-WMO-NEXT:    lb.aq a0, (a0)
+; RV32IA-ZALASR-WMO-NEXT:    ret
+;
+; RV32IA-ZALASR-TSO-LABEL: atomic_load_i8_acquire:
+; RV32IA-ZALASR-TSO:       # %bb.0:
+; RV32IA-ZALASR-TSO-NEXT:    lbu a0, 0(a0)
----------------
topperc wrote:

Yes, this was noted in 129d5ce "This only affects global isel because SelectionDAG won't create an
anyext i8 atomic_load today."

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


More information about the llvm-commits mailing list