Branch & Control Instructions
36 AMDGPU instructions in this category - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| s_barrier_leave | s_barrier_leave | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_barrier_wait | s_barrier_wait | SOPP | Wait for a barrier to complete. The SIMM16 argument specifies which barrier to wait on. |
| s_branch | s_branch offset | SOPP | Unconditional relative branch. |
| s_cbranch_scc1 | s_cbranch_scc1 offset | SOPP | Conditional relative branch, taken when the SCC (scalar condition code) flag is set. |
| s_decperflevel | s_decperflevel | SOPP | Decrement performance counter specified in SIMM16[3:0] by 1. |
| s_delay_alu | s_delay_alu | SOPP | Insert delay between dependent SALU/VALU instructions. |
| s_endpgm | s_endpgm | SOPP | End of program; terminate wavefront. |
| s_endpgm_saved | s_endpgm_saved | SOPP | End of program; signal that a wave has been saved by the context-switch trap handler and terminate wavefront. |
| s_icache_inv | s_icache_inv | SOPP | Invalidate entire first level instruction cache. |
| s_incperflevel | s_incperflevel | SOPP | Increment performance counter specified in SIMM16[3:0] by 1. |
| s_monitor_sleep | s_monitor_sleep | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_nop | s_nop | SOPP | Do nothing. |
| s_sendmsg | s_sendmsg | SOPP | Send a message upstream to graphics control hardware. SIMM16[9:0] contains the message type. |
| s_sendmsghalt | s_sendmsghalt | SOPP | Send a message to upstream control hardware and then HALT the wavefront; see S_SENDMSG for details. |
| s_set_gpr_idx_mode | s_set_gpr_idx_mode | SOPP | Modify the mode used for vector GPR indexing. |
| s_set_gpr_idx_off | s_set_gpr_idx_off | SOPP | Clear GPR indexing mode. |
| s_set_inst_prefetch_distance | s_set_inst_prefetch_distance | SOPP | Change instruction prefetch mode. This controls how many cachelines ahead of the current PC the shader attempts to prefetch. |
| s_set_vgpr_msb | s_set_vgpr_msb | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_sethalt | s_sethalt | SOPP | Set or clear the HALT status bit. |
| s_setkill | s_setkill | SOPP | Kill this wave if the least significant bit of the immediate constant is 1. Used primarily for debugging kill wave host command behavior. |
| s_setprio | s_setprio | SOPP | Change wave user priority. |
| s_setprio_inc_wg | s_setprio_inc_wg | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_sleep | s_sleep | SOPP | Cause a wave to sleep for up to ~8000 clocks. |
| s_soft_wait_bvhcnt | s_soft_wait_bvhcnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_wait_dscnt | s_soft_wait_dscnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_wait_kmcnt | s_soft_wait_kmcnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_wait_loadcnt | s_soft_wait_loadcnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_wait_samplecnt | s_soft_wait_samplecnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_wait_storecnt | s_soft_wait_storecnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_soft_waitcnt | s_soft_waitcnt | SOPP | AMDGPU SOPP scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_trap | s_trap | SOPP | Enter the trap handler. |
| s_ttracedata | s_ttracedata | SOPP | Send M0 as user data to the thread trace stream. |
| s_wait_alu | s_wait_alu | SOPP | Wait for one or more ALU-centric counters to fall below specified values. |
| s_wait_event | s_wait_event | SOPP | Wait for an event to occur or a condition to be satisfied before continuing. The SIMM16 argument specifies which event(s) to wait on. |
| s_waitcnt | s_waitcnt | SOPP | Wait for the counts of outstanding local data share, vector memory and export instructions to be at or below the specified levels. |
| s_wakeup | s_wakeup | SOPP | Allow a wave to 'ping' all the other waves in its threadgroup to force them to wake up early from an S_SLEEP instruction. |