[PATCH] D137575: [AMDGPU][MC] Disable SGPRs as src operands of VOP3 VINTRP instructions

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 02:21:14 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG05baf681a3c2: [AMDGPU][MC] Disable SGPRs as src operands of VOP3 VINTRP instructions (authored by dp).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137575/new/

https://reviews.llvm.org/D137575

Files:
  llvm/lib/Target/AMDGPU/VOP3Instructions.td
  llvm/test/MC/AMDGPU/vintrp-e64-err.s


Index: llvm/test/MC/AMDGPU/vintrp-e64-err.s
===================================================================
--- /dev/null
+++ llvm/test/MC/AMDGPU/vintrp-e64-err.s
@@ -0,0 +1,45 @@
+// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck %s --implicit-check-not=error:
+// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck %s --implicit-check-not=error:
+// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck %s --implicit-check-not=error:
+
+v_interp_p1_f32_e64 v5, 0.5, attr0.w
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1_f32_e64 v5, s1, attr0.w
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1ll_f16 v5, 0.5, attr0.w
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1ll_f16 v5, s1, attr0.w
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1lv_f16 v5, 0.5, attr0.w, v3
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1lv_f16 v5, s1, attr0.w, v3
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1lv_f16 v5, v1, attr31.w, 0.5
+// CHECK: error: invalid operand for instruction
+
+v_interp_p1lv_f16 v5, v1, attr31.w, s1
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f16 v5, 0.5, attr0.w, v3
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f16 v5, s1, attr0.w, v3
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f16 v5, v1, attr1.w, 0.5
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f16 v5, v1, attr1.w, s1
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f32_e64 v5, 0.5, attr31.w
+// CHECK: error: invalid operand for instruction
+
+v_interp_p2_f32_e64 v5, s1, attr31.w
+// CHECK: error: invalid operand for instruction
Index: llvm/lib/Target/AMDGPU/VOP3Instructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -59,6 +59,7 @@
 }
 
 def VOP3_INTERP : VOPProfile<[f32, f32, i32, untyped]> {
+  let Src0Mod = FPVRegInputMods;
   let Ins64 = (ins Src0Mod:$src0_modifiers, VRegSrc_32:$src0,
                    Attr:$attr, AttrChan:$attrchan,
                    clampmod0:$clamp, omod0:$omod);
@@ -108,6 +109,9 @@
   let HasOMod = !ne(DstVT.Value, f16.Value);
   let HasHigh = 1;
 
+  let Src0Mod = FPVRegInputMods;
+  let Src2Mod = FPVRegInputMods;
+
   let Outs64 = (outs DstRC.RegClass:$vdst);
   let Ins64 = getInterp16Ins<HasSrc2, HasOMod, Src0Mod, Src2Mod>.ret;
   let Asm64 = getInterp16Asm<HasSrc2, HasOMod>.ret;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137575.474700.patch
Type: text/x-patch
Size: 2560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221111/027b1f12/attachment.bin>


More information about the llvm-commits mailing list