[PATCH] D123693: Transform illegal intrinsics to V_ILLEGAL
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 07:06:29 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:8399
+
+ // Add the V_ILLEGAL node to the root chain to prevent its removal.
+ auto Chains = SmallVector<SDValue, 2u>();
----------------
Leonc wrote:
> arsenm wrote:
> > bcahoon wrote:
> > > The v_illegal should have an operand for the chain operand in the original instruction, if one exists.
> > >
> > > t0 EntryToken
> > > res,ch = intrinsic t0, <other opernads>
> > > ->
> > > res = undef
> > > ch = v_illegal t0
> > >
> > > Also, if there is a use of the chain definition in the original instruction, then there is no need to add the code below.
> > I'd expect to use the original chain, but it also doesn't really matter given that it's filler anyway
> Thanks @bcahoon & @arsenm.
>
> I added a check for `MemSDNode` and pass the chain to `V_ILLEGAL` if it exists.
Checking for MemSDNode doesn't make sense, other nodes can have chains. You would need to pass it in from the source if it applies. However I don't think it's worth the complexity, since this really is filler content anyway
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123693/new/
https://reviews.llvm.org/D123693
More information about the llvm-commits
mailing list