Page MenuHomePhabricator

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

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

Details

Summary

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.

See https://bugs.llvm.org/show_bug.cgi?id=43607

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
lib/Target/AMDGPU/VOP2Instructions.td
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.
lib/Target/AMDGPU/VOP2Instructions.td
223 ↗(On Diff #225384)

Sure!

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