[llvm] [AMDGPU] Add gfx13 MC support for exclusive scan instructions (PR #226077)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 01:59:37 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Mariusz Sikora (mariusz-sikora-at-amd)

<details>
<summary>Changes</summary>



---

Patch is 86.56 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/226077.diff


7 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AMDGPU.td (+5) 
- (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.td (+1) 
- (modified) llvm/lib/Target/AMDGPU/VOP3Instructions.td (+54) 
- (modified) llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s (+592) 
- (modified) llvm/test/MC/AMDGPU/gfx13_asm_vop3.s (+603) 
- (added) llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1_err-fake16.s (+230) 
- (added) llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1_err.s (+230) 


``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.td b/llvm/lib/Target/AMDGPU/AMDGPU.td
index bab8ade0acc74..fbff03457208f 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPU.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPU.td
@@ -562,6 +562,10 @@ defm AshrPkInsts : AMDGPUSubtargetFeature<"ashr-pk-insts",
   "Has Arithmetic Shift Pack instructions"
 >;
 
+defm ExclusiveScanInsts : AMDGPUSubtargetFeature<"exclusive-scan-insts",
+  "Has exclusive scan instructions"
+>;
+
 defm CvtPkF16F32Inst : AMDGPUSubtargetFeature<"cvt-pk-f16-f32-inst",
   "Has cvt_pk_f16_f32 instruction"
 >;
@@ -2655,6 +2659,7 @@ def FeatureISAVersion13 : FeatureSet<
   [FeatureGFX13,
    FeatureGFX1250Insts,
    FeatureWaveMatchInsts,
+   FeatureExclusiveScanInsts,
    FeatureAddressableLocalMemorySize196608,
    FeatureLDSAllocGranularity1024,
    FeatureLDSEncodingGranularity1024,
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
index 1df90ebbe9216..508e8ebbdf155 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
@@ -3097,6 +3097,7 @@ def VOP_F16_F16_I16 : VOPProfile <[f16, f16, i16, untyped]>;
 def VOP_F16_F16_I32 : VOPProfile <[f16, f16, i32, untyped]>;
 def VOP_I16_I16_I16 : VOPProfile <[i16, i16, i16, untyped]>;
 def VOP_I16_I16_I16_ARITH : VOPProfile <[i16, i16, i16, untyped], /*EnableClamp=*/1>;
+def VOP_I16_I16_I32 : VOPProfile <[i16, i16, i32, untyped]>;
 def VOP_BF16_BF16_BF16 : VOPProfile <[bf16, bf16, bf16, untyped]>;
 
 def VOP_I16_I16_I16_I16 : VOPProfile <[i16, i16, i16, i16, untyped]>;
diff --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
index 5722fa2613ad8..5e78ba730c20e 100644
--- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -2123,6 +2123,47 @@ let isConvergent = 1, SubtargetPredicate = HasWaveMatchInsts in {
   defm V_WAVE_MATCH_B32 : VOP3Inst<"v_wave_match_b32", VOP_WAVE_MATCH_B32>;
 }
 
+class VOP_EXCLUSIVE_SCAN<VOPProfile p, VOP3Features f = VOP3_REGULAR> : VOP3_Profile<p, f> {
+  let HasExtVOP3DPP = 0;
+}
+
+class VOP_EXCLUSIVE_SCAN_t16<VOPProfile p, VOP3Features f = VOP3_OPSEL_ONLY> : VOP3_Profile_True16<p, f> {
+  let HasExtVOP3DPP = 0;
+}
+
+class VOP_EXCLUSIVE_SCAN_fake16<VOPProfile p, VOP3Features f = VOP3_OPSEL_ONLY> : VOP3_Profile_Fake16<p, f> {
+  let HasExtVOP3DPP = 0;
+}
+
+// Derives the asm name from the record name.
+multiclass V_EXCLUSIVE_SCAN<VOPProfile p, VOP3Features f = VOP3_REGULAR> {
+  defm NAME : VOP3Inst<!tolower(NAME), VOP_EXCLUSIVE_SCAN<p, f>>;
+}
+
+// Generates _t16 and _fake16 variants with correctly suffixed asm/PseudoInstr names.
+multiclass V_EXCLUSIVE_SCAN_t16<VOPProfile p, VOP3Features f = VOP3_OPSEL_ONLY> {
+  let True16Predicate = UseRealTrue16Insts in
+    defm _t16   : VOP3Inst<!tolower(NAME#"_t16"),   VOP_EXCLUSIVE_SCAN_t16<p, f>>;
+  let True16Predicate = UseFakeTrue16Insts in
+    defm _fake16 : VOP3Inst<!tolower(NAME#"_fake16"), VOP_EXCLUSIVE_SCAN_fake16<p, f>>;
+}
+
+let isConvergent = 1, SubtargetPredicate = HasExclusiveScanInsts in {
+  defm V_EXCLUSIVE_SCAN_SUM_I32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32, VOP3_CLAMP>;
+  defm V_EXCLUSIVE_SCAN_SUM_U32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32, VOP3_CLAMP>;
+  defm V_EXCLUSIVE_SCAN_XOR_B32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_OR_B32  : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_AND_B32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_MIN_I32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_MIN_I16 : V_EXCLUSIVE_SCAN_t16<VOP_I16_I16_I32>;
+  defm V_EXCLUSIVE_SCAN_MAX_I32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_MAX_I16 : V_EXCLUSIVE_SCAN_t16<VOP_I16_I16_I32>;
+  defm V_EXCLUSIVE_SCAN_MIN_U32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_MIN_U16 : V_EXCLUSIVE_SCAN_t16<VOP_I16_I16_I32>;
+  defm V_EXCLUSIVE_SCAN_MAX_U32 : V_EXCLUSIVE_SCAN<VOP_I32_I32_I32>;
+  defm V_EXCLUSIVE_SCAN_MAX_U16 : V_EXCLUSIVE_SCAN_t16<VOP_I16_I16_I32>;
+}
+
 //===----------------------------------------------------------------------===//
 // Integer Clamp Patterns
 //===----------------------------------------------------------------------===//
@@ -2199,6 +2240,19 @@ defm V_MINMAX_NUM_F32     : VOP3_Realtriple_with_name_gfx12_gfx13<0x268,0x268, "
 defm V_MAXMIN_NUM_F32     : VOP3_Realtriple_with_name_gfx12_gfx13<0x269, 0x269, "V_MAXMIN_F32", "v_maxmin_num_f32">;
 defm V_MINMAX_NUM_F16     : VOP3_Realtriple_t16_and_fake16_gfx12_gfx13<0x26a, 0x26a, "v_minmax_num_f16", "V_MINMAX_F16", "v_minmax_f16">;
 defm V_MAXMIN_NUM_F16     : VOP3_Realtriple_t16_and_fake16_gfx12_gfx13<0x26b, 0x26b, "v_maxmin_num_f16", "V_MAXMIN_F16", "v_maxmin_f16">;
+defm V_EXCLUSIVE_SCAN_SUM_I32 : VOP3Only_Real_Base_gfx13<0x242>;
+defm V_EXCLUSIVE_SCAN_SUM_U32 : VOP3Only_Real_Base_gfx13<0x243>;
+defm V_EXCLUSIVE_SCAN_XOR_B32 : VOP3Only_Real_Base_gfx13<0x244>;
+defm V_EXCLUSIVE_SCAN_OR_B32  : VOP3Only_Real_Base_gfx13<0x245>;
+defm V_EXCLUSIVE_SCAN_AND_B32 : VOP3Only_Real_Base_gfx13<0x246>;
+defm V_EXCLUSIVE_SCAN_MIN_I32 : VOP3Only_Real_Base_gfx13<0x247>;
+defm V_EXCLUSIVE_SCAN_MIN_I16 : VOP3Only_Real_with_name_t16_and_fake16_gfx13<0x248>;
+defm V_EXCLUSIVE_SCAN_MAX_I32 : VOP3Only_Real_Base_gfx13<0x249>;
+defm V_EXCLUSIVE_SCAN_MAX_I16 : VOP3Only_Real_with_name_t16_and_fake16_gfx13<0x24a>;
+defm V_EXCLUSIVE_SCAN_MIN_U32 : VOP3Only_Real_Base_gfx13<0x24b>;
+defm V_EXCLUSIVE_SCAN_MIN_U16 : VOP3Only_Real_with_name_t16_and_fake16_gfx13<0x24c>;
+defm V_EXCLUSIVE_SCAN_MAX_U32 : VOP3Only_Real_Base_gfx13<0x24d>;
+defm V_EXCLUSIVE_SCAN_MAX_U16 : VOP3Only_Real_with_name_t16_and_fake16_gfx13<0x24e>;
 
 // Define regular and "no inline constant" variant (for gfx12) of a
 // F16 pseudo-scalar transcendental instruction.
diff --git a/llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s b/llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
index 1fd215a1bc6eb..428b8c70da6e2 100644
--- a/llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+++ b/llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
@@ -2434,6 +2434,597 @@ v_div_scale_f64 v[254:255], vcc, 0xaf123456, -vcc, -1 clamp div:2
 // W32-ERR: :[[@LINE-1]]:29: error: invalid operand for instruction
 // W64: v_div_scale_f64 v[254:255], vcc, 0xaf123456, -vcc, -1 clamp div:2 ; encoding: [0xfe,0xea,0xfd,0xd6,0xff,0xd4,0x04,0x5b,0x56,0x34,0x12,0xaf]
 
+v_exclusive_scan_and_b32 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_and_b32 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x46,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_and_b32 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_and_b32 v5, -1, exec_hi ; encoding: [0x05,0x00,0x46,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, 0.5, m0
+// GFX13: v_exclusive_scan_and_b32 v5, 0.5, m0    ; encoding: [0x05,0x00,0x46,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, exec_hi, null
+// GFX13: v_exclusive_scan_and_b32 v5, exec_hi, null ; encoding: [0x05,0x00,0x46,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_and_b32 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x46,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_and_b32 v5, m0, 0.5
+// GFX13: v_exclusive_scan_and_b32 v5, m0, 0.5    ; encoding: [0x05,0x00,0x46,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_and_b32 v5, null, exec_lo
+// GFX13: v_exclusive_scan_and_b32 v5, null, exec_lo ; encoding: [0x05,0x00,0x46,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, s1, s2
+// GFX13: v_exclusive_scan_and_b32 v5, s1, s2     ; encoding: [0x05,0x00,0x46,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, s105, s105
+// GFX13: v_exclusive_scan_and_b32 v5, s105, s105 ; encoding: [0x05,0x00,0x46,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_and_b32 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x46,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_and_b32 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_and_b32 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x46,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_and_b32 v5, v1, v2
+// GFX13: v_exclusive_scan_and_b32 v5, v1, v2     ; encoding: [0x05,0x00,0x46,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_and_b32 v5, v255, v255
+// GFX13: v_exclusive_scan_and_b32 v5, v255, v255 ; encoding: [0x05,0x00,0x46,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_and_b32 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_and_b32 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x46,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_and_b32 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_and_b32 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x46,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_max_i16 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_max_i16 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x4a,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_i16 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_max_i16 v5, -1, exec_hi ; encoding: [0x05,0x00,0x4a,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, 0.5, m0
+// GFX13: v_exclusive_scan_max_i16 v5, 0.5, m0    ; encoding: [0x05,0x00,0x4a,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, exec_hi, null
+// GFX13: v_exclusive_scan_max_i16 v5, exec_hi, null ; encoding: [0x05,0x00,0x4a,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_max_i16 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x4a,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_max_i16 v5, m0, 0.5
+// GFX13: v_exclusive_scan_max_i16 v5, m0, 0.5    ; encoding: [0x05,0x00,0x4a,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_max_i16 v5, null, exec_lo
+// GFX13: v_exclusive_scan_max_i16 v5, null, exec_lo ; encoding: [0x05,0x00,0x4a,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, s1, s2
+// GFX13: v_exclusive_scan_max_i16 v5, s1, s2     ; encoding: [0x05,0x00,0x4a,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, s105, s105
+// GFX13: v_exclusive_scan_max_i16 v5, s105, s105 ; encoding: [0x05,0x00,0x4a,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_max_i16 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x4a,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_max_i16 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_max_i16 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x4a,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_max_i16 v5, v1, v2
+// GFX13: v_exclusive_scan_max_i16 v5, v1, v2     ; encoding: [0x05,0x00,0x4a,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_max_i16 v5, v255, v255
+// GFX13: v_exclusive_scan_max_i16 v5, v255, v255 ; encoding: [0x05,0x00,0x4a,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_max_i16 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_max_i16 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x4a,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_i16 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_max_i16 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x4a,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_max_i32 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_max_i32 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x49,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_i32 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_max_i32 v5, -1, exec_hi ; encoding: [0x05,0x00,0x49,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, 0.5, m0
+// GFX13: v_exclusive_scan_max_i32 v5, 0.5, m0    ; encoding: [0x05,0x00,0x49,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, exec_hi, null
+// GFX13: v_exclusive_scan_max_i32 v5, exec_hi, null ; encoding: [0x05,0x00,0x49,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_max_i32 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x49,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_max_i32 v5, m0, 0.5
+// GFX13: v_exclusive_scan_max_i32 v5, m0, 0.5    ; encoding: [0x05,0x00,0x49,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_max_i32 v5, null, exec_lo
+// GFX13: v_exclusive_scan_max_i32 v5, null, exec_lo ; encoding: [0x05,0x00,0x49,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, s1, s2
+// GFX13: v_exclusive_scan_max_i32 v5, s1, s2     ; encoding: [0x05,0x00,0x49,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, s105, s105
+// GFX13: v_exclusive_scan_max_i32 v5, s105, s105 ; encoding: [0x05,0x00,0x49,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_max_i32 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x49,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_max_i32 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_max_i32 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x49,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_max_i32 v5, v1, v2
+// GFX13: v_exclusive_scan_max_i32 v5, v1, v2     ; encoding: [0x05,0x00,0x49,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_max_i32 v5, v255, v255
+// GFX13: v_exclusive_scan_max_i32 v5, v255, v255 ; encoding: [0x05,0x00,0x49,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_max_i32 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_max_i32 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x49,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_i32 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_max_i32 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x49,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_max_u16 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_max_u16 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x4e,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_u16 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_max_u16 v5, -1, exec_hi ; encoding: [0x05,0x00,0x4e,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, 0.5, m0
+// GFX13: v_exclusive_scan_max_u16 v5, 0.5, m0    ; encoding: [0x05,0x00,0x4e,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, exec_hi, null
+// GFX13: v_exclusive_scan_max_u16 v5, exec_hi, null ; encoding: [0x05,0x00,0x4e,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_max_u16 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x4e,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_max_u16 v5, m0, 0.5
+// GFX13: v_exclusive_scan_max_u16 v5, m0, 0.5    ; encoding: [0x05,0x00,0x4e,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_max_u16 v5, null, exec_lo
+// GFX13: v_exclusive_scan_max_u16 v5, null, exec_lo ; encoding: [0x05,0x00,0x4e,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, s1, s2
+// GFX13: v_exclusive_scan_max_u16 v5, s1, s2     ; encoding: [0x05,0x00,0x4e,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, s105, s105
+// GFX13: v_exclusive_scan_max_u16 v5, s105, s105 ; encoding: [0x05,0x00,0x4e,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_max_u16 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x4e,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_max_u16 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_max_u16 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x4e,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_max_u16 v5, v1, v2
+// GFX13: v_exclusive_scan_max_u16 v5, v1, v2     ; encoding: [0x05,0x00,0x4e,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_max_u16 v5, v255, v255
+// GFX13: v_exclusive_scan_max_u16 v5, v255, v255 ; encoding: [0x05,0x00,0x4e,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_max_u16 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_max_u16 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x4e,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_u16 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_max_u16 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x4e,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_max_u32 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_max_u32 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x4d,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_u32 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_max_u32 v5, -1, exec_hi ; encoding: [0x05,0x00,0x4d,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, 0.5, m0
+// GFX13: v_exclusive_scan_max_u32 v5, 0.5, m0    ; encoding: [0x05,0x00,0x4d,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, exec_hi, null
+// GFX13: v_exclusive_scan_max_u32 v5, exec_hi, null ; encoding: [0x05,0x00,0x4d,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_max_u32 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x4d,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_max_u32 v5, m0, 0.5
+// GFX13: v_exclusive_scan_max_u32 v5, m0, 0.5    ; encoding: [0x05,0x00,0x4d,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_max_u32 v5, null, exec_lo
+// GFX13: v_exclusive_scan_max_u32 v5, null, exec_lo ; encoding: [0x05,0x00,0x4d,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, s1, s2
+// GFX13: v_exclusive_scan_max_u32 v5, s1, s2     ; encoding: [0x05,0x00,0x4d,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, s105, s105
+// GFX13: v_exclusive_scan_max_u32 v5, s105, s105 ; encoding: [0x05,0x00,0x4d,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_max_u32 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x4d,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_max_u32 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_max_u32 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x4d,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_max_u32 v5, v1, v2
+// GFX13: v_exclusive_scan_max_u32 v5, v1, v2     ; encoding: [0x05,0x00,0x4d,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_max_u32 v5, v255, v255
+// GFX13: v_exclusive_scan_max_u32 v5, v255, v255 ; encoding: [0x05,0x00,0x4d,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_max_u32 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_max_u32 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x4d,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_max_u32 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_max_u32 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x4d,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_min_i16 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_min_i16 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x48,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_min_i16 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_min_i16 v5, -1, exec_hi ; encoding: [0x05,0x00,0x48,0xd6,0xc1,0xfe,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, 0.5, m0
+// GFX13: v_exclusive_scan_min_i16 v5, 0.5, m0    ; encoding: [0x05,0x00,0x48,0xd6,0xf0,0xfa,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, exec_hi, null
+// GFX13: v_exclusive_scan_min_i16 v5, exec_hi, null ; encoding: [0x05,0x00,0x48,0xd6,0x7f,0xf8,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, exec_lo, -1
+// GFX13: v_exclusive_scan_min_i16 v5, exec_lo, -1 ; encoding: [0x05,0x00,0x48,0xd6,0x7e,0x82,0x01,0x02]
+
+v_exclusive_scan_min_i16 v5, m0, 0.5
+// GFX13: v_exclusive_scan_min_i16 v5, m0, 0.5    ; encoding: [0x05,0x00,0x48,0xd6,0x7d,0xe0,0x01,0x02]
+
+v_exclusive_scan_min_i16 v5, null, exec_lo
+// GFX13: v_exclusive_scan_min_i16 v5, null, exec_lo ; encoding: [0x05,0x00,0x48,0xd6,0x7c,0xfc,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, s1, s2
+// GFX13: v_exclusive_scan_min_i16 v5, s1, s2     ; encoding: [0x05,0x00,0x48,0xd6,0x01,0x04,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, s105, s105
+// GFX13: v_exclusive_scan_min_i16 v5, s105, s105 ; encoding: [0x05,0x00,0x48,0xd6,0x69,0xd2,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, src_scc, vcc_lo
+// GFX13: v_exclusive_scan_min_i16 v5, src_scc, vcc_lo ; encoding: [0x05,0x00,0x48,0xd6,0xfd,0xd4,0x00,0x02]
+
+v_exclusive_scan_min_i16 v5, ttmp15, src_scc
+// GFX13: v_exclusive_scan_min_i16 v5, ttmp15, src_scc ; encoding: [0x05,0x00,0x48,0xd6,0x7b,0xfa,0x01,0x02]
+
+v_exclusive_scan_min_i16 v5, v1, v2
+// GFX13: v_exclusive_scan_min_i16 v5, v1, v2     ; encoding: [0x05,0x00,0x48,0xd6,0x01,0x05,0x02,0x02]
+
+v_exclusive_scan_min_i16 v5, v255, v255
+// GFX13: v_exclusive_scan_min_i16 v5, v255, v255 ; encoding: [0x05,0x00,0x48,0xd6,0xff,0xff,0x03,0x02]
+
+v_exclusive_scan_min_i16 v5, vcc_hi, 0xfe0b
+// GFX13: v_exclusive_scan_min_i16 v5, vcc_hi, 0xfe0b ; encoding: [0x05,0x00,0x48,0xd6,0x6b,0xfe,0x01,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_min_i16 v5, vcc_lo, ttmp15
+// GFX13: v_exclusive_scan_min_i16 v5, vcc_lo, ttmp15 ; encoding: [0x05,0x00,0x48,0xd6,0x6a,0xf6,0x00,0x02]
+
+v_exclusive_scan_min_i32 v255, 0xfe0b, vcc_hi
+// GFX13: v_exclusive_scan_min_i32 v255, 0xfe0b, vcc_hi ; encoding: [0xff,0x00,0x47,0xd6,0xff,0xd6,0x00,0x02,0x0b,0xfe,0x00,0x00]
+
+v_exclusive_scan_min_i32 v5, -1, exec_hi
+// GFX13: v_exclusive_scan_min_i32 v5, -1, exec_hi ; e...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/226077


More information about the llvm-commits mailing list