[PATCH] D89502: AMDGPU: Don't kill super-register with overlapping copy

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 15:32:30 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:924
+  // instruction, since it will also kill the components made live by this def.
+  const bool CanKillSuperReg = KillSrc && !RI.regsOverlap(SrcReg, DestReg);
+
----------------
rampitec wrote:
> arsenm wrote:
> > rampitec wrote:
> > > It could be some other unrelated superreg?
> > If it's unrelated, we can kill the original source like was done before
> Say the source is v[0:1] and we are killing it. But there is somewhere v[1:2] used, not in this instruction. We will kill that v[1:2] as well, right?
It kills the v1 portion, so a later instruction would be reading an undef value


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

https://reviews.llvm.org/D89502



More information about the llvm-commits mailing list