[PATCH] D87149: [InstCombine] erase instructions leading up to unreachable

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 11:45:52 PDT 2020


nikic added a comment.

> Actually, that would be out-of-bounds for instcombine. Removing a phi operand would mean removing the incoming block too, and we don't do that in instcombine. So I think we just bail out if a value still has uses. SimplifyCFG will eventually get it.

Replacing with undef before erasing would do as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87149



More information about the llvm-commits mailing list