This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX10][WS32] Corrected decoding of dst operand for v_cmp_*_sdwa opcodes
ClosedPublic

Authored by dp on Oct 2 2019, 11:05 AM.

Details

Summary

v_cmp_*_sdwa instructions are decoded incorrectly in wavesize=32 mode: the size of dst is invalid. An example:

0xf9,0x04,0x1e,0x7d,0x01,0xfb,0x06,0x06

Should be decoded as follows:

v_cmp_class_f16_sdwa ttmp15, v1, v2 src0_sel:DWORD src1_sel:DWORD

Actual result:

v_cmp_class_f16_sdwa ttmp[14:15], v1, v2 src0_sel:DWORD src1_sel:DWORD

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

Diff Detail

Event Timeline

dp created this revision.Oct 2 2019, 11:05 AM
rampitec accepted this revision.Oct 2 2019, 11:16 AM

LGTM with a nit.

test/MC/Disassembler/AMDGPU/vcmp-gfx10.txt
7

Please add new line.

This revision is now accepted and ready to land.Oct 2 2019, 11:16 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2019, 6:06 AM