[llvm] [AMDGPU] Change `scale_sel` to be 4 bits (PR #157900)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 09:57:41 PDT 2025
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/157900
The latest SP changes updated it to use `OP_SEL[0:3]` instead of `OP_SEL[0:2]`.
Fixes SWDEV-554472.
>From a0ec13115a33815b12783eb59f25bbe035a7581e Mon Sep 17 00:00:00 2001
From: Shilei Tian <i at tianshilei.me>
Date: Wed, 10 Sep 2025 12:56:57 -0400
Subject: [PATCH] [AMDGPU] Change `scale_sel` to be 4 bits
The latest SP changes updated it to use `OP_SEL[0:3]` instead of `OP_SEL[0:2]`.
Fixes SWDEV-554472.
---
llvm/lib/Target/AMDGPU/SIInstrInfo.td | 2 +-
llvm/test/MC/AMDGPU/gfx1250_asm_vop3_err.s | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
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
More information about the llvm-commits
mailing list