[PATCH] D87149: [InstCombine] erase instructions leading up to unreachable
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 19 08:30:46 PDT 2020
spatel added a comment.
In D87149#2282484 <https://reviews.llvm.org/D87149#2282484>, @nikic wrote:
>> 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.
Draft of that idea:
D87965 <https://reviews.llvm.org/D87965>
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