bgeu
bgeu
rs1, rs2, label
if (rs1 >= rs2) goto label
R
31–25funct7
24–20rs2
19–15rs1
14–12funct3
11–7rd
6–0opcode
I
31–20imm[11:0]
19–15rs1
14–12funct3
11–7rd
6–0opcode
S
31–25imm[11:5]
24–20rs2
19–15rs1
14–12funct3
11–7imm[4:0]
6–0opcode
B
31–25imm[12,10:5]
24–20rs2
19–15rs1
14–12funct3
11–7imm[4:1,11]
6–0opcode
U
31–12imm[31:12]
11–7rd
6–0opcode
J
31–12imm[20,10:1,11,19:12]
11–7rd
6–0opcode

bgeu is the unsigned version of bge, and the exact opposite of bltu. The name is branch if greater than or equal, unsigned: it jumps to the label when rs1 is at least rs2, with both read as never-negative numbers. (See bge for the comparison and bltu for what unsigned changes.)

This completes the family of six branches, which is worth seeing as a whole. There are three questions — equal, less-than, and greater-or-equal — and the last two each come in a signed and an unsigned form, giving: beq/bne for equality, blt/bge for signed ordering, and bltu/bgeu for unsigned ordering. Every comparison a program needs is built from these six (plus operand-swapping for the greater-than and less-or-equal directions).

bgeu speaks naturally about limits on quantities that cannot be negative: leave a loop when a position reaches the end, reject an index that has hit the array size, branch to an overflow handler when a length reaches capacity. Walking through memory by comparing addresses is a bltu/bgeu job, since addresses are unsigned — using the signed versions there is the usual hidden bug.

Its mirror of the combined bounds check works too: bgeu i, n, error catches an index that is either too large or negative in a single instruction, because a negative index reads as a huge unsigned value and trips the test.