[PATCH] D123393: AMDGPU: Fix assert if v_mov_b32_dpp is last instruction in the block

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 11:04:27 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:8073
     // doesn't modify exec.
     if (UseInst.getParent() != DefBB)
       return true;
----------------
foad wrote:
> It would be more in keeping with the original design to just exclude PHI instructions here. The assumption is that all the uses counted in NumUse will necessarily come after DefMI in the same BB, so the second loop below will always terminate before hitting the end of the BB.
That's a bit too clever for me. I'd rather just have normal looking end iterator checks


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

https://reviews.llvm.org/D123393



More information about the llvm-commits mailing list