[PATCH] D90307: [AMDGPU] Fix double space in disassembly of ds_gws_sema_* with gds

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 14:58:51 PDT 2020


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp:142
+    if (OpNo == 0)
+      O << ' ';
   }
----------------
foad wrote:
> foad wrote:
> > rampitec wrote:
> > > Are you sure it didn't add an extra space in some other instructions? Are there any other instructions where offset can be the first operand?
> > > Are you sure it didn't add an extra space in some other instructions?
> > 
> > Well it didn't break any disassembler tests with -strict-whitespace. I did wonder if it might add an extra space at the *end* of some other instruction, that would be hidden because -show-encoding pads with spaces to a fixed column number before adding the "; encoding:" comment. But...
> > 
> > > Are there any other instructions where offset can be the first operand?
> > 
> > No, I have looked through the output of tablegen and I can't find any others.
> An alternative fix would be to remove this special handling of OpNo==0 and change the AsmStrings to remove the space between the mnemonic and the $offset operand. I can try that out.
If it works it would be cleaner.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90307/new/

https://reviews.llvm.org/D90307



More information about the llvm-commits mailing list