[PATCH] D133972: [AMDGPU] Fix size of SOPK instructions to 4 bytes

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 13:46:26 PDT 2022


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

Instructions in SOPK format may not have 32-bit 
literal constants following the instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133972

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp


Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -7483,7 +7483,7 @@
 
   // If we have a definitive size, we can use it. Otherwise we need to inspect
   // the operands to know the size.
-  if (isFixedSize(MI)) {
+  if (isFixedSize(MI) || isSOPK()) {
     unsigned Size = DescSize;
 
     // If we hit the buggy offset, an extra nop will be inserted in MC so


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133972.460498.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220915/b245c74b/attachment.bin>


More information about the llvm-commits mailing list