diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h --- a/llvm/include/llvm/CodeGen/TargetLowering.h +++ b/llvm/include/llvm/CodeGen/TargetLowering.h @@ -1875,6 +1875,12 @@ return ISD::ZERO_EXTEND; } + /// Returns how the platform's atomic compare and swap expects its comparison + /// value to be extended (ZERO_EXTEND, SIGN_EXTEND, or ANY_EXTEND). + virtual ISD::NodeType getExtendForAtomicCmpSwapArg() const { + return ISD::ANY_EXTEND; + } + /// @} /// Returns true if we should normalize diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -272,8 +272,24 @@ return Res.getValue(1); } - SDValue Op2 = GetPromotedInteger(N->getOperand(2)); + // Op2 is used for the comparison and thus must be extended according to the + // target's atomic operations. Op3 is merely stored and so can be left alone. + SDValue Op2 = N->getOperand(2); SDValue Op3 = GetPromotedInteger(N->getOperand(3)); + switch (TLI.getExtendForAtomicCmpSwapArg()) { + case ISD::SIGN_EXTEND: + Op2 = SExtPromotedInteger(Op2); + break; + case ISD::ZERO_EXTEND: + Op2 = ZExtPromotedInteger(Op2); + break; + case ISD::ANY_EXTEND: + Op2 = GetPromotedInteger(Op2); + break; + default: + llvm_unreachable("Invalid atomic op extension"); + } + SDVTList VTs = DAG.getVTList(Op2.getValueType(), N->getValueType(1), MVT::Other); SDValue Res = DAG.getAtomicCmpSwap( diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h --- a/llvm/lib/Target/RISCV/RISCVISelLowering.h +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h @@ -127,6 +127,10 @@ return ISD::SIGN_EXTEND; } + ISD::NodeType getExtendForAtomicCmpSwapArg() const override { + return ISD::SIGN_EXTEND; + } + bool shouldExpandShift(SelectionDAG &DAG, SDNode *N) const override { if (DAG.getMachineFunction().getFunction().hasMinSize()) return false; diff --git a/llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll b/llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll --- a/llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll +++ b/llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll @@ -1628,6 +1628,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_monotonic_monotonic: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB20_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB20_3 @@ -1680,6 +1681,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_acquire_monotonic: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB21_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aq a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB21_3 @@ -1732,6 +1734,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_acquire_acquire: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB22_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aq a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB22_3 @@ -1784,6 +1787,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_release_monotonic: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB23_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB23_3 @@ -1836,6 +1840,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_release_acquire: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB24_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB24_3 @@ -1888,6 +1893,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_acq_rel_monotonic: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB25_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aq a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB25_3 @@ -1940,6 +1946,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_acq_rel_acquire: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB26_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aq a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB26_3 @@ -1992,6 +1999,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_seq_cst_monotonic: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB27_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aqrl a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB27_3 @@ -2044,6 +2052,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_seq_cst_acquire: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB28_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aqrl a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB28_3 @@ -2096,6 +2105,7 @@ ; ; RV64IA-LABEL: cmpxchg_i32_seq_cst_seq_cst: ; RV64IA: # %bb.0: +; RV64IA-NEXT: sext.w a1, a1 ; RV64IA-NEXT: .LBB29_1: # =>This Inner Loop Header: Depth=1 ; RV64IA-NEXT: lr.w.aqrl a3, (a0) ; RV64IA-NEXT: bne a3, a1, .LBB29_3 diff --git a/llvm/test/CodeGen/RISCV/atomic-rmw.ll b/llvm/test/CodeGen/RISCV/atomic-rmw.ll --- a/llvm/test/CodeGen/RISCV/atomic-rmw.ll +++ b/llvm/test/CodeGen/RISCV/atomic-rmw.ll @@ -13143,7 +13143,7 @@ ; RV32I-NEXT: call __atomic_compare_exchange_4 ; RV32I-NEXT: lw a3, 12(sp) ; RV32I-NEXT: bnez a0, .LBB162_4 -; RV32I-NEXT: LBB162_2: # %atomicrmw.start +; RV32I-NEXT: .LBB162_2: # %atomicrmw.start ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1 ; RV32I-NEXT: mv a2, a3 ; RV32I-NEXT: bgeu s1, a3, .LBB162_1 @@ -14848,7 +14848,7 @@ ; RV32I-NEXT: # in Loop: Header=BB200_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB200_5 -; RV32I-NEXT: .LBB200_4: +; RV32I-NEXT: .LBB200_4: # in Loop: Header=BB200_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB200_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB200_2 Depth=1 @@ -14905,7 +14905,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB200_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB200_5 -; RV32IA-NEXT: .LBB200_4: +; RV32IA-NEXT: .LBB200_4: # in Loop: Header=BB200_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB200_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB200_2 Depth=1 @@ -15010,7 +15010,7 @@ ; RV32I-NEXT: # in Loop: Header=BB201_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB201_5 -; RV32I-NEXT: .LBB201_4: +; RV32I-NEXT: .LBB201_4: # in Loop: Header=BB201_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB201_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB201_2 Depth=1 @@ -15067,7 +15067,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB201_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB201_5 -; RV32IA-NEXT: .LBB201_4: +; RV32IA-NEXT: .LBB201_4: # in Loop: Header=BB201_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB201_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB201_2 Depth=1 @@ -15172,7 +15172,7 @@ ; RV32I-NEXT: # in Loop: Header=BB202_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB202_5 -; RV32I-NEXT: .LBB202_4: +; RV32I-NEXT: .LBB202_4: # in Loop: Header=BB202_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB202_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB202_2 Depth=1 @@ -15229,7 +15229,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB202_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB202_5 -; RV32IA-NEXT: .LBB202_4: +; RV32IA-NEXT: .LBB202_4: # in Loop: Header=BB202_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB202_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB202_2 Depth=1 @@ -15334,7 +15334,7 @@ ; RV32I-NEXT: # in Loop: Header=BB203_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB203_5 -; RV32I-NEXT: .LBB203_4: +; RV32I-NEXT: .LBB203_4: # in Loop: Header=BB203_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB203_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB203_2 Depth=1 @@ -15391,7 +15391,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB203_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB203_5 -; RV32IA-NEXT: .LBB203_4: +; RV32IA-NEXT: .LBB203_4: # in Loop: Header=BB203_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB203_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB203_2 Depth=1 @@ -15496,7 +15496,7 @@ ; RV32I-NEXT: # in Loop: Header=BB204_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB204_5 -; RV32I-NEXT: .LBB204_4: +; RV32I-NEXT: .LBB204_4: # in Loop: Header=BB204_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB204_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB204_2 Depth=1 @@ -15553,7 +15553,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB204_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB204_5 -; RV32IA-NEXT: .LBB204_4: +; RV32IA-NEXT: .LBB204_4: # in Loop: Header=BB204_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB204_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB204_2 Depth=1 @@ -15658,7 +15658,7 @@ ; RV32I-NEXT: # in Loop: Header=BB205_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB205_5 -; RV32I-NEXT: .LBB205_4: +; RV32I-NEXT: .LBB205_4: # in Loop: Header=BB205_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB205_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB205_2 Depth=1 @@ -15716,7 +15716,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB205_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB205_5 -; RV32IA-NEXT: .LBB205_4: +; RV32IA-NEXT: .LBB205_4: # in Loop: Header=BB205_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB205_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB205_2 Depth=1 @@ -15822,7 +15822,7 @@ ; RV32I-NEXT: # in Loop: Header=BB206_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB206_5 -; RV32I-NEXT: .LBB206_4: +; RV32I-NEXT: .LBB206_4: # in Loop: Header=BB206_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB206_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB206_2 Depth=1 @@ -15880,7 +15880,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB206_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB206_5 -; RV32IA-NEXT: .LBB206_4: +; RV32IA-NEXT: .LBB206_4: # in Loop: Header=BB206_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB206_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB206_2 Depth=1 @@ -15986,7 +15986,7 @@ ; RV32I-NEXT: # in Loop: Header=BB207_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB207_5 -; RV32I-NEXT: .LBB207_4: +; RV32I-NEXT: .LBB207_4: # in Loop: Header=BB207_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB207_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB207_2 Depth=1 @@ -16044,7 +16044,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB207_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB207_5 -; RV32IA-NEXT: .LBB207_4: +; RV32IA-NEXT: .LBB207_4: # in Loop: Header=BB207_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB207_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB207_2 Depth=1 @@ -16150,7 +16150,7 @@ ; RV32I-NEXT: # in Loop: Header=BB208_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB208_5 -; RV32I-NEXT: .LBB208_4: +; RV32I-NEXT: .LBB208_4: # in Loop: Header=BB208_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB208_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB208_2 Depth=1 @@ -16208,7 +16208,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB208_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB208_5 -; RV32IA-NEXT: .LBB208_4: +; RV32IA-NEXT: .LBB208_4: # in Loop: Header=BB208_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB208_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB208_2 Depth=1 @@ -16314,7 +16314,7 @@ ; RV32I-NEXT: # in Loop: Header=BB209_2 Depth=1 ; RV32I-NEXT: slt a0, s1, a5 ; RV32I-NEXT: j .LBB209_5 -; RV32I-NEXT: .LBB209_4: +; RV32I-NEXT: .LBB209_4: # in Loop: Header=BB209_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB209_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB209_2 Depth=1 @@ -16372,7 +16372,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB209_2 Depth=1 ; RV32IA-NEXT: slt a0, s1, a5 ; RV32IA-NEXT: j .LBB209_5 -; RV32IA-NEXT: .LBB209_4: +; RV32IA-NEXT: .LBB209_4: # in Loop: Header=BB209_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB209_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB209_2 Depth=1 @@ -16478,7 +16478,7 @@ ; RV32I-NEXT: # in Loop: Header=BB210_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB210_5 -; RV32I-NEXT: .LBB210_4: +; RV32I-NEXT: .LBB210_4: # in Loop: Header=BB210_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB210_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB210_2 Depth=1 @@ -16535,7 +16535,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB210_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB210_5 -; RV32IA-NEXT: .LBB210_4: +; RV32IA-NEXT: .LBB210_4: # in Loop: Header=BB210_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB210_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB210_2 Depth=1 @@ -16640,7 +16640,7 @@ ; RV32I-NEXT: # in Loop: Header=BB211_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB211_5 -; RV32I-NEXT: .LBB211_4: +; RV32I-NEXT: .LBB211_4: # in Loop: Header=BB211_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB211_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB211_2 Depth=1 @@ -16697,7 +16697,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB211_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB211_5 -; RV32IA-NEXT: .LBB211_4: +; RV32IA-NEXT: .LBB211_4: # in Loop: Header=BB211_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB211_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB211_2 Depth=1 @@ -16802,7 +16802,7 @@ ; RV32I-NEXT: # in Loop: Header=BB212_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB212_5 -; RV32I-NEXT: .LBB212_4: +; RV32I-NEXT: .LBB212_4: # in Loop: Header=BB212_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB212_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB212_2 Depth=1 @@ -16859,7 +16859,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB212_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB212_5 -; RV32IA-NEXT: .LBB212_4: +; RV32IA-NEXT: .LBB212_4: # in Loop: Header=BB212_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB212_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB212_2 Depth=1 @@ -16964,7 +16964,7 @@ ; RV32I-NEXT: # in Loop: Header=BB213_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB213_5 -; RV32I-NEXT: .LBB213_4: +; RV32I-NEXT: .LBB213_4: # in Loop: Header=BB213_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB213_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB213_2 Depth=1 @@ -17021,7 +17021,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB213_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB213_5 -; RV32IA-NEXT: .LBB213_4: +; RV32IA-NEXT: .LBB213_4: # in Loop: Header=BB213_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB213_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB213_2 Depth=1 @@ -17126,7 +17126,7 @@ ; RV32I-NEXT: # in Loop: Header=BB214_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB214_5 -; RV32I-NEXT: .LBB214_4: +; RV32I-NEXT: .LBB214_4: # in Loop: Header=BB214_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB214_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB214_2 Depth=1 @@ -17183,7 +17183,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB214_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB214_5 -; RV32IA-NEXT: .LBB214_4: +; RV32IA-NEXT: .LBB214_4: # in Loop: Header=BB214_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB214_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB214_2 Depth=1 @@ -17288,7 +17288,7 @@ ; RV32I-NEXT: # in Loop: Header=BB215_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB215_5 -; RV32I-NEXT: .LBB215_4: +; RV32I-NEXT: .LBB215_4: # in Loop: Header=BB215_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB215_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB215_2 Depth=1 @@ -17346,7 +17346,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB215_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB215_5 -; RV32IA-NEXT: .LBB215_4: +; RV32IA-NEXT: .LBB215_4: # in Loop: Header=BB215_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB215_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB215_2 Depth=1 @@ -17452,7 +17452,7 @@ ; RV32I-NEXT: # in Loop: Header=BB216_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB216_5 -; RV32I-NEXT: .LBB216_4: +; RV32I-NEXT: .LBB216_4: # in Loop: Header=BB216_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB216_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB216_2 Depth=1 @@ -17510,7 +17510,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB216_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB216_5 -; RV32IA-NEXT: .LBB216_4: +; RV32IA-NEXT: .LBB216_4: # in Loop: Header=BB216_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB216_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB216_2 Depth=1 @@ -17616,7 +17616,7 @@ ; RV32I-NEXT: # in Loop: Header=BB217_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB217_5 -; RV32I-NEXT: .LBB217_4: +; RV32I-NEXT: .LBB217_4: # in Loop: Header=BB217_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB217_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB217_2 Depth=1 @@ -17674,7 +17674,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB217_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB217_5 -; RV32IA-NEXT: .LBB217_4: +; RV32IA-NEXT: .LBB217_4: # in Loop: Header=BB217_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB217_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB217_2 Depth=1 @@ -17780,7 +17780,7 @@ ; RV32I-NEXT: # in Loop: Header=BB218_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB218_5 -; RV32I-NEXT: .LBB218_4: +; RV32I-NEXT: .LBB218_4: # in Loop: Header=BB218_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB218_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB218_2 Depth=1 @@ -17838,7 +17838,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB218_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB218_5 -; RV32IA-NEXT: .LBB218_4: +; RV32IA-NEXT: .LBB218_4: # in Loop: Header=BB218_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB218_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB218_2 Depth=1 @@ -17944,7 +17944,7 @@ ; RV32I-NEXT: # in Loop: Header=BB219_2 Depth=1 ; RV32I-NEXT: sltu a0, s1, a5 ; RV32I-NEXT: j .LBB219_5 -; RV32I-NEXT: .LBB219_4: +; RV32I-NEXT: .LBB219_4: # in Loop: Header=BB219_2 Depth=1 ; RV32I-NEXT: sltu a0, s2, a4 ; RV32I-NEXT: .LBB219_5: # %atomicrmw.start ; RV32I-NEXT: # in Loop: Header=BB219_2 Depth=1 @@ -18002,7 +18002,7 @@ ; RV32IA-NEXT: # in Loop: Header=BB219_2 Depth=1 ; RV32IA-NEXT: sltu a0, s1, a5 ; RV32IA-NEXT: j .LBB219_5 -; RV32IA-NEXT: .LBB219_4: +; RV32IA-NEXT: .LBB219_4: # in Loop: Header=BB219_2 Depth=1 ; RV32IA-NEXT: sltu a0, s2, a4 ; RV32IA-NEXT: .LBB219_5: # %atomicrmw.start ; RV32IA-NEXT: # in Loop: Header=BB219_2 Depth=1