[PATCH] D139469: [AMDGPU] Enable OMod on more VOP3 instructions

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 14:45:54 PST 2022


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

OMod was disabled if OpSel was enabled, but that restriction is more
specific than necessary. Any VOP3 with float operands can use OMod.

On GFX11, FMAC_F16_e64 can use op_sel.
Previously, SIFoldOperands and convertToThreeAddress were accidentally correct when
they reinterpreted the zero OMod operand on V_FMAC_F16_e64 as the OpSel operand on
V_FMA_F16_gfx9_e64. Now we explicitly add op_sel if required.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139469

Files:
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.td
  llvm/lib/Target/AMDGPU/VOP2Instructions.td
  llvm/lib/Target/AMDGPU/VOP3Instructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fmed3.s16.mir
  llvm/test/CodeGen/AMDGPU/commute-vop3.mir
  llvm/test/CodeGen/AMDGPU/fmul-2-combine-multi-use.ll
  llvm/test/CodeGen/AMDGPU/gfx11-twoaddr-fma.mir
  llvm/test/CodeGen/AMDGPU/omod.ll
  llvm/test/CodeGen/AMDGPU/shrink-mad-fma.mir
  llvm/test/MC/AMDGPU/gfx11_asm_vop3.s
  llvm/test/MC/AMDGPU/gfx9_asm_vop3_e64.s
  llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3.txt
  llvm/test/MC/Disassembler/AMDGPU/gfx9_vop3.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139469.480637.patch
Type: text/x-patch
Size: 51238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221206/60d2d5e8/attachment-0001.bin>


More information about the llvm-commits mailing list