This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] V_LDEXP_F16 encoding fix and doc update.
ClosedPublic

Authored by Joe_Nash on Oct 18 2022, 12:40 PM.

Details

Summary

The amdgcn.ldexp.* intrinsics take an i32 value as src1.
The V_LDEXP_F16 instruction considers src1 an f16 operand, and therefore
src1 is implicitly truncated to 16 bits when lowering to that instruction from the
intrinsic. This is unlikely to result in an error in practice
because values that large are not useful.

The operand class of src1 in the True16 version of the instruction has
been corrected to encode correctly on GFX11.

Diff Detail

Event Timeline

Joe_Nash created this revision.Oct 18 2022, 12:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 12:40 PM
Joe_Nash requested review of this revision.Oct 18 2022, 12:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 12:40 PM
rampitec accepted this revision.Oct 18 2022, 12:46 PM
This revision is now accepted and ready to land.Oct 18 2022, 12:46 PM
foad accepted this revision.Oct 19 2022, 1:23 AM
foad added inline comments.
llvm/lib/Target/AMDGPU/VOP2Instructions.td
845–848

It's a matter of taste, but you don't need the braces if there's only a single def inside the let.

This revision was automatically updated to reflect the committed changes.
Joe_Nash marked an inline comment as done.