Subtract with Borrow-Out Arithmetic
Subtract two operands and record the borrow-out for use by a subsequent extended-precision subtract.
Vendor-Neutral Definition
d = a - b (mod 2^width); borrow_out_flag = 1 if the true difference underflowed, else 0.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler
translations.
equivalent with restrictions
Both subtract two operands and record whether the result underflowed, for use in a following extended-precision subtract.
| Property | NVIDIA PTX | AMDGPU |
|---|---|---|
| Instruction | sub.cc | v_sub_co_u32, s_sub_u32 |
| ISA Layer | Virtual | Native |
| Data Types | - | u32 |
| Version / Target Introduced | PTX ISA 1.2 | gfx1100, gfx942/gfx1100 |
Important Differences
- Same CC-register-vs-VCC/SCC convention difference as add-with-carry-out applies here.
Source Evidence
- Parallel Thread Execution ISA ↗ - NVIDIA Corporation
- User Guide for AMDGPU Backend ↗ - LLVM Project
Verification method: documentation