[PATCH] D106042: [AMDGPU] Ignore KILLs when forming clauses
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 08:20:23 PDT 2021
sebastian-ne added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp:300
+ if (isVerbose())
+ OutStreamer->emitRawComment(" meta instruction");
+ return;
----------------
arsenm wrote:
> sebastian-ne wrote:
> > arsenm wrote:
> > > I don't see a reason to emit a comment for these. Kills for example already have a comment for them
> > The problem is that the AsmPrinter only handles top-level instructions, but not instructions inside bundles.
> > So, without the code here, printing a bundle containing a KILL will crash because KILL and others are unhandled in `AMDGPUInstPrinter::printInstruction`.
> We shouldn't be bundling these?
How do we create the clause then?
In the tests, we have
```
$sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0
KILL undef renamable $sgpr4
$sgpr3 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 4, 0
```
and we should be able to emit an `s_clause 0x1` in front of the two memory instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106042/new/
https://reviews.llvm.org/D106042
More information about the llvm-commits
mailing list