[PATCH] D89386: [AMDGPU] Fix access beyond the end of the basic block in execMayBeModifiedBeforeAnyUse.

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 09:32:28 PDT 2020


vpykhtin marked 3 inline comments as done.
vpykhtin added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:7122
   // Stop scan when we have seen all the uses.
   for (auto I = std::next(DefMI.getIterator()); ; ++I) {
+    assert(I != DefBB->end());
----------------
foad wrote:
> Is it possible to enter this loop with NumUse == 0? If so, I would expect the assert on the next line to fail.
I added the check before the loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89386



More information about the llvm-commits mailing list