[PATCH] D115881: [WIP][AMDGPU][GlobalISel] Add patterns for no-return atomic ops with single address and data in tblgen.
Abinav Puthan Purayil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 02:42:53 PST 2021
abinavpp added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/DSInstructions.td:130
+: DS_Pseudo<opName,
+ (outs data_op:$vdst), // FIXME: Empty (outs) is not working in global-isel.
+ (ins VGPR_32:$addr, getLdStRegisterOperand<rc>.ret:$data0, offset:$offset, gds:$gds),
----------------
Petar.Avramovic wrote:
> abinavpp wrote:
> > This is incorrect, breaking the MC tests and might be related to the change in
> > SIInsertWaitcnts behaviour in some of the modified tests. How can we fix this?
> // FIXME: Empty (outs) is not working in global-isel.
>
> Check GlobalISelEmitter.cpp for:
> ```
> if (DstI.Operands.NumDefs < Src->getExtTypes().size())
> return failedImport("Src pattern result has more defs than dst MI (" +
> to_string(Src->getExtTypes().size()) + " def(s) vs " +
> to_string(DstI.Operands.NumDefs) + " def(s))");
> ```
> no ret has unused return in mir right? You want nothing in the output.
Thank you! I didn't know about the -warn-on-skipped-patterns option in
global-isel's tblgen back-end.
Along with the modified patterns in this patch, I'm seeing the "Src pattern
result has more defs than dst MI" warning for NoRtn `Pat`s like
FlatSignedAtomicPatNoRtn, GlobalAtomicNoRtnSaddrPat etc. in FLATInstructions.td
without this patch.
In `Pat`s, how do we specify no defs for a src PatFrag to the tblgen back-end
when we have a dst `Instruction` with an empty `outs`? The FIXME near class
DSAtomicRetPat in this change asks for the same.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115881/new/
https://reviews.llvm.org/D115881
More information about the llvm-commits
mailing list