[llvm] [AMDGPU] Change `scale_sel` to be 4 bits (PR #157900)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 09:58:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Shilei Tian (shiltian)
<details>
<summary>Changes</summary>
The latest SP changes updated it to use `OP_SEL[0:3]` instead of `OP_SEL[0:2]`.
Fixes SWDEV-554472.
---
Full diff: https://github.com/llvm/llvm-project/pull/157900.diff
2 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.td (+1-1)
- (modified) llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s (+2-2)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
index aa5dae09ca185..7b877a4f74373 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
@@ -1353,7 +1353,7 @@ def MatrixAReuse : NamedBitOperand<"matrix_a_reuse">;
def MatrixBReuse : NamedBitOperand<"matrix_b_reuse">;
def ScaleSel : NamedIntOperand<"scale_sel"> {
- let Validator = "isUInt<3>";
+ let Validator = "isUInt<4>";
}
class KImmFPOperand<ValueType vt> : ImmOperand<vt> {
diff --git a/llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s b/llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s
index e87943224e8f5..cce8e1ef24f5f 100644
--- a/llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s
+++ b/llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s
@@ -277,9 +277,9 @@ v_cvt_sr_fp8_f16 v1, v2, v3 mul:2
// GFX125X-ERR-NEXT:{{^}}v_cvt_sr_fp8_f16 v1, v2, v3 mul:2
// GFX125X-ERR-NEXT:{{^}} ^
-v_cvt_scale_pk8_f32_fp8 v[10:17], v[20:21], v8 scale_sel:8
+v_cvt_scale_pk8_f32_fp8 v[10:17], v[20:21], v8 scale_sel:16
// GFX125X-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid scale_sel value.
-// GFX125X-ERR-NEXT:{{^}}v_cvt_scale_pk8_f32_fp8 v[10:17], v[20:21], v8 scale_sel:8
+// GFX125X-ERR-NEXT:{{^}}v_cvt_scale_pk8_f32_fp8 v[10:17], v[20:21], v8 scale_sel:16
// GFX125X-ERR-NEXT:{{^}} ^
v_cvt_sr_bf8_f16 v1, v2, v3 byte_sel:4
``````````
</details>
https://github.com/llvm/llvm-project/pull/157900
More information about the llvm-commits
mailing list