Skip to content

Conversation

@rampitec
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

rampitec commented Jul 10, 2025

@rampitec rampitec requested a review from Sisyph July 10, 2025 20:47
@rampitec rampitec marked this pull request as ready for review July 10, 2025 20:48
@llvmbot llvmbot added backend:AMDGPU llvm:mc Machine (object) code labels Jul 10, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2025

@llvm/pr-subscribers-mc

Author: Stanislav Mekhanoshin (rampitec)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/148057.diff

1 Files Affected:

  • (modified) llvm/test/MC/AMDGPU/gfx1250_err.s (+25)
diff --git a/llvm/test/MC/AMDGPU/gfx1250_err.s b/llvm/test/MC/AMDGPU/gfx1250_err.s
index ddb6d9520ce1d..3e1b4cf6d2bb4 100644
--- a/llvm/test/MC/AMDGPU/gfx1250_err.s
+++ b/llvm/test/MC/AMDGPU/gfx1250_err.s
@@ -1,5 +1,30 @@
 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX1250-ERR --implicit-check-not=error: -strict-whitespace %s
 
+// For v_dual_cndmask_b32 use of the explicit src2 forces VOPD3 form even if it is vcc_lo.
+// If src2 is omitted then it forces VOPD form. As a result a proper form of the instruction
+// has to be used if the other component of the dual instruction cannot be used if that
+// encoding.
+
+v_dual_cndmask_b32 v2, v4, v1 :: v_dual_fma_f32 v7, v1, v2, v3
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid VOPDY instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v2, v4, v1 :: v_dual_fma_f32 v7, v1, v2, v3
+// GFX1250-ERR:                                  ^
+
+v_dual_fma_f32 v7, v1, v2, v3 :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
+// GFX1250-ERR: v_dual_fma_f32 v7, v1, v2, v3 :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: ^
+
+v_dual_cndmask_b32 v7, v1, v2 :: v_dual_cndmask_b32 v2, v4, v1, vcc_lo
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v7, v1, v2 :: v_dual_cndmask_b32 v2, v4, v1, vcc_lo
+// GFX1250-ERR:                                                                 ^
+
+v_dual_cndmask_b32 v7, v1, v2, vcc_lo :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v7, v1, v2, vcc_lo :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: ^
+
 // Check for unique 64-bit literal
 
 s_andn2_b64 s[2:3], 0x10abcdef12345678, 0xabcdef12345678

@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Stanislav Mekhanoshin (rampitec)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/148057.diff

1 Files Affected:

  • (modified) llvm/test/MC/AMDGPU/gfx1250_err.s (+25)
diff --git a/llvm/test/MC/AMDGPU/gfx1250_err.s b/llvm/test/MC/AMDGPU/gfx1250_err.s
index ddb6d9520ce1d..3e1b4cf6d2bb4 100644
--- a/llvm/test/MC/AMDGPU/gfx1250_err.s
+++ b/llvm/test/MC/AMDGPU/gfx1250_err.s
@@ -1,5 +1,30 @@
 // RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX1250-ERR --implicit-check-not=error: -strict-whitespace %s
 
+// For v_dual_cndmask_b32 use of the explicit src2 forces VOPD3 form even if it is vcc_lo.
+// If src2 is omitted then it forces VOPD form. As a result a proper form of the instruction
+// has to be used if the other component of the dual instruction cannot be used if that
+// encoding.
+
+v_dual_cndmask_b32 v2, v4, v1 :: v_dual_fma_f32 v7, v1, v2, v3
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid VOPDY instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v2, v4, v1 :: v_dual_fma_f32 v7, v1, v2, v3
+// GFX1250-ERR:                                  ^
+
+v_dual_fma_f32 v7, v1, v2, v3 :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
+// GFX1250-ERR: v_dual_fma_f32 v7, v1, v2, v3 :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: ^
+
+v_dual_cndmask_b32 v7, v1, v2 :: v_dual_cndmask_b32 v2, v4, v1, vcc_lo
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v7, v1, v2 :: v_dual_cndmask_b32 v2, v4, v1, vcc_lo
+// GFX1250-ERR:                                                                 ^
+
+v_dual_cndmask_b32 v7, v1, v2, vcc_lo :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
+// GFX1250-ERR: v_dual_cndmask_b32 v7, v1, v2, vcc_lo :: v_dual_cndmask_b32 v2, v4, v1
+// GFX1250-ERR: ^
+
 // Check for unique 64-bit literal
 
 s_andn2_b64 s[2:3], 0x10abcdef12345678, 0xabcdef12345678

@rampitec rampitec force-pushed the users/rampitec/07-10-_amdgpu_autogenerate_gfx1250_vopd_tests._nfc branch from 7756b50 to a55daca Compare July 10, 2025 23:19
@rampitec rampitec force-pushed the users/rampitec/07-10-_amdgpu_negative_gfx1250_v_dual_cndmask_b32_tests._nfc branch from 10f072f to 8cb56d1 Compare July 10, 2025 23:19
@rampitec rampitec force-pushed the users/rampitec/07-10-_amdgpu_autogenerate_gfx1250_vopd_tests._nfc branch from a55daca to 376a9f7 Compare July 11, 2025 00:27
@rampitec rampitec force-pushed the users/rampitec/07-10-_amdgpu_negative_gfx1250_v_dual_cndmask_b32_tests._nfc branch from 8cb56d1 to 19a3db5 Compare July 11, 2025 00:27
Base automatically changed from users/rampitec/07-10-_amdgpu_autogenerate_gfx1250_vopd_tests._nfc to main July 11, 2025 17:38
@rampitec rampitec merged commit 6dc193a into main Jul 11, 2025
12 of 15 checks passed
@rampitec rampitec deleted the users/rampitec/07-10-_amdgpu_negative_gfx1250_v_dual_cndmask_b32_tests._nfc branch July 11, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:AMDGPU llvm:mc Machine (object) code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants