[PATCH] D136195: [AMDGPU] V_LDEXP_F16 encoding fix and doc update.

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 12:40:21 PDT 2022


Joe_Nash created this revision.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
Joe_Nash requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136195

Files:
  llvm/include/llvm/IR/IntrinsicsAMDGPU.td
  llvm/lib/Target/AMDGPU/VOP2Instructions.td
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.f16.ll
  llvm/test/MC/AMDGPU/gfx11_asm_vop2_t16_err.s
  llvm/test/MC/AMDGPU/gfx11_asm_vop2_t16_promote.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136195.468665.patch
Type: text/x-patch
Size: 12794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221018/144209c6/attachment.bin>


More information about the llvm-commits mailing list