This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Support gfx940 v_lshl_add_u64 instruction
ClosedPublic

Authored by rampitec on Mar 10 2022, 12:07 PM.

Diff Detail

Event Timeline

rampitec created this revision.Mar 10 2022, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 12:08 PM
rampitec requested review of this revision.Mar 10 2022, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 12:08 PM
Herald added a subscriber: wdng. · View Herald Transcript
foad added inline comments.Mar 11 2022, 1:50 AM
llvm/lib/Target/AMDGPU/VOP3Instructions.td
689

If this is a normal VOP3 then surely src1 can be anything, so why restrict it to immediates 0..4 ? If this is a real restriction on the allowed operands, then you should probably mention that where the instruction is defined.

rampitec updated this revision to Diff 414727.Mar 11 2022, 12:15 PM
rampitec marked an inline comment as done.

Added comment about the instruction.

llvm/lib/Target/AMDGPU/VOP3Instructions.td
689

This is a real limitation:
LSHL_ADD is a 64-bit which left-shifts the result by 0-4 (use “0” to get Add_U64).

foad added inline comments.Mar 11 2022, 2:19 PM
llvm/lib/Target/AMDGPU/VOP3Instructions.td
669

It shifts one of the operands, not the result

rampitec updated this revision to Diff 414755.Mar 11 2022, 2:39 PM
rampitec marked an inline comment as done.
rampitec added inline comments.
llvm/lib/Target/AMDGPU/VOP3Instructions.td
669

Oops, copied from the spec :( Took the description from a more formal spec now.

foad accepted this revision.Mar 11 2022, 11:04 PM
This revision is now accepted and ready to land.Mar 11 2022, 11:04 PM
This revision was landed with ongoing or failed builds.Mar 14 2022, 3:46 PM
This revision was automatically updated to reflect the committed changes.