[PATCH] D137238: [AMDGPU][MC][GFX11][NFC] Correct VINTERP src operands
Dmitry Preobrazhensky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 04:55:24 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f6895218382: [AMDGPU][MC][GFX11][NFC] Correct VINTERP src operands (authored by dp).
Changed prior to commit:
https://reviews.llvm.org/D137238?vs=472884&id=473622#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137238/new/
https://reviews.llvm.org/D137238
Files:
llvm/lib/Target/AMDGPU/VINTERPInstructions.td
llvm/test/MC/AMDGPU/gfx11_asm_vinterp_err.s
Index: llvm/test/MC/AMDGPU/gfx11_asm_vinterp_err.s
===================================================================
--- /dev/null
+++ llvm/test/MC/AMDGPU/gfx11_asm_vinterp_err.s
@@ -0,0 +1,42 @@
+// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 %s 2>&1 | FileCheck %s -check-prefix=GFX11-ERR --implicit-check-not=error: --strict-whitespace
+
+//===----------------------------------------------------------------------===//
+// VINTERP src operands must be VGPRs.
+// Check that other operand kinds are rejected by assembler.
+//===----------------------------------------------------------------------===//
+
+v_interp_p10_f32 v0, s1, v2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p10_f32 v0, v1, s2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p10_f32 v0, v1, v2, s3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f32 v0, 1, v2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f32 v0, v1, 2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f32 v0, v1, v2, 3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p10_f16_f32 v0, s1, v2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p10_f16_f32 v0, v1, s2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p10_f16_f32 v0, v1, v2, s3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f16_f32 v0, 1, v2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f16_f32 v0, v1, 2, v3
+// GFX11-ERR: error: invalid operand for instruction
+
+v_interp_p2_f16_f32 v0, v1, v2, 3
+// GFX11-ERR: error: invalid operand for instruction
Index: llvm/lib/Target/AMDGPU/VINTERPInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VINTERPInstructions.td
+++ llvm/lib/Target/AMDGPU/VINTERPInstructions.td
@@ -63,6 +63,10 @@
let HasOpSel = 0;
let HasModifiers = 1;
+ let Src0Mod = FPVRegInputMods;
+ let Src1Mod = FPVRegInputMods;
+ let Src2Mod = FPVRegInputMods;
+
let Outs64 = (outs VGPR_32:$vdst);
let Ins64 = (ins Src0Mod:$src0_modifiers, VRegSrc_32:$src0,
Src1Mod:$src1_modifiers, VRegSrc_32:$src1,
@@ -77,6 +81,10 @@
let HasOpSel = 1;
let HasModifiers = 1;
+ let Src0Mod = FPVRegInputMods;
+ let Src1Mod = FPVRegInputMods;
+ let Src2Mod = FPVRegInputMods;
+
let Outs64 = (outs VGPR_32:$vdst);
let Ins64 = (ins Src0Mod:$src0_modifiers, VRegSrc_32:$src0,
Src1Mod:$src1_modifiers, VRegSrc_32:$src1,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137238.473622.patch
Type: text/x-patch
Size: 2580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221107/6f8f0518/attachment.bin>
More information about the llvm-commits
mailing list