Page MenuHomePhabricator

[AMDGPU][MC][GFX9] Corrected parsing of v_cndmask_b32_sdwa

Authored by dp on Oct 17 2019, 3:27 AM.



Consider the following instruction:

v_cndmask_b32_sdwa v5, vcc_lo, v2, vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD src1_sel:DWORD

Assembler should detect a violation of constant bus restrictions bit it does not. Instead it produces the following code with invalid src0 and src1:

v_cndmask_b32_sdwa v5, v2, vcc, vcc  dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD src1_sel:DWORD

This may look like a minor issue but it affects GFX10 where the provided example should trigger no errors.

Assembler currently does not support v_cndmask_b32_[sdwa/dpp/dpp8] for GFX10; it will be implemented by a separate change.


Diff Detail

Event Timeline

dp created this revision.Oct 17 2019, 3:27 AM
This revision is now accepted and ready to land.Oct 17 2019, 9:15 AM
rampitec added inline comments.Oct 17 2019, 12:30 PM
223 ↗(On Diff #225384)

BTW, it misses foreach here too. You need to rebase to master, it does exist there.

dp marked 2 inline comments as done.Oct 17 2019, 12:43 PM
dp added inline comments.
223 ↗(On Diff #225384)


This revision was automatically updated to reflect the committed changes.
dp marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2019, 6:35 AM