[PATCH] D114700: AMDGPU/GlobalISel: Fix constant bus restriction errors for med3

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 05:23:51 PST 2021


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: foad, arsenm, sebastian-ne.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
Petar.Avramovic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Move sgpr operands that violate constant bus restriction to vgpr
when creating med3 in post-regbankselect combiner.
SDAG does this in postiselhook via legalizeOperandsVOP3.
Detected on targets older then gfx10 (e.g. gfx9) for constants
that are too large to be inlined (constant are sgpr by default).


https://reviews.llvm.org/D114700

Files:
  llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-smed3.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-umed3.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/smed3.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/umed3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114700.390311.patch
Type: text/x-patch
Size: 64310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211129/c4cbd3af/attachment.bin>


More information about the llvm-commits mailing list