Bitwise AND Logic & Shift
Compute the bitwise AND of two operands.
Vendor-Neutral Definition
d = a & b, evaluated bit-by-bit at the operand's width.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler
translations.
equivalent with restrictions
Both compute a bit-for-bit AND; AMDGPU splits scalar and vector forms where PTX has one generic and.
| Property | NVIDIA PTX | AMDGPU |
|---|---|---|
| Instruction | and | v_and_b32, s_and_b32 |
| ISA Layer | Virtual | Native |
| Data Types | b16, b32, b64, pred | b32 |
| Version / Target Introduced | PTX ISA 1.0 | gfx1100, gfx1100 |
Important Differences
- AMDGPU's s_and_b32 additionally sets SCC to indicate a nonzero result - a side effect PTX's and has no equivalent for.
Source Evidence
- Parallel Thread Execution ISA ↗ - NVIDIA Corporation
- User Guide for AMDGPU Backend ↗ - LLVM Project
Verification method: documentation