Bitwise XOR Logic & Shift

Compute the bitwise exclusive-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 XOR; AMDGPU splits scalar and vector forms where PTX has one generic xor.
Property NVIDIA PTX AMDGPU
Instruction xor v_xor_b32, s_xor_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_xor_b32 additionally sets SCC to indicate a nonzero result - a side effect PTX's xor has no equivalent for.

Source Evidence

Verification method: documentation