Bitwise OR Logic & Shift

Compute the bitwise OR 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 OR; AMDGPU splits scalar and vector forms where PTX has one generic or.
Property NVIDIA PTX AMDGPU
Instruction or v_or_b32, s_or_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_or_b32 additionally sets SCC to indicate a nonzero result - a side effect PTX's or has no equivalent for.

Source Evidence

Verification method: documentation