[PATCH] D69823: [IR] PR27065: Added tests for BasicBlock::removePredecessor.

Denis Bakhvalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 15:03:12 PST 2019


dendibakh marked an inline comment as done.
dendibakh added inline comments.


================
Comment at: llvm/test/Transforms/Inline/clone-function-no-assert-on-phis.ll:8-10
+; [[TMP81_I:%.*]] = getelementptr inbounds i8, i8* [[TMP81_I]], i64 1
+; It happens to work, because the code is dead and
+; verifier doesn't complain.
----------------
lebedev.ri wrote:
> Can that happen for non-dead code?
> That is perfectly okay for dead, unreachable code.
I think it doesn't happen for non-dead code. Otherwise, verifier would tell us about that.
Regarding BasicBlock::removePredecessor behavior: this is okay to leave broken code in unreachable blocks until someone will try to link detached blocks again. And we never know what will happen after user called removePredecessor. In this sense BasicBlock::removePredecessor should not leave broken code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69823





More information about the llvm-commits mailing list