[PATCH] D123693: Transform illegal intrinsics to V_ILLEGAL

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:27:10 PDT 2022


arsenm added a comment.

Missing testscases. Also should include some assembler and disassembler tests for V_ILLEGAL



================
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>();
----------------
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


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