sltiu
sltiu
rd, rs1, imm
rd = (rs1 < imm) ? 1 : 0
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

sltiu combines the two variations you have just met: it compares a register against a constant (like slti) and reads the values as unsigned (like sltu). The name stacks the suffixes — set less than, immediate, unsigned. The form sltiu rd, rs1, imm writes 1 into rd if rs1 is below the constant imm when both are read as never-negative numbers, and 0 otherwise.

Unsigned, as on the sltu page, means the top bit is treated as part of the number rather than as a negative sign, so the range runs 0 to about 4 billion with no negatives. This makes sltiu the right choice for range-checking values that cannot be negative — testing whether an index is below the size of an array, for instance — in a single instruction.

It also powers one very common building block. sltiu rd, rs, 1 asks is this value below 1, and since the only unsigned value below 1 is 0 itself, the result is 1 exactly when rs is zero and 0 otherwise. That is precisely a test for equals zero, and it is how the seqz shorthand is built. Equality between two values follows from it: XOR them together (giving zero only if they matched) and then test for zero.

As with slti, constants beyond the 12-bit range must first be loaded into a register with li and compared using the register form sltu.