[all-commits] [llvm/llvm-project] a0ff26: [GlobalOpt] Fix assertion failure during instructi...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Dec 2 02:58:55 PST 2021
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-12-02 (Thu, 02 Dec 2021)
[GlobalOpt] Fix assertion failure during instruction deletion
This fixes the assertion failure reported in https://reviews.llvm.org/D114889#3166417,
by making RecursivelyDeleteTriviallyDeadInstructionsPermissive()
more permissive. As the function accepts a WeakTrackingVH, even if
originally only Instructions were inserted, we may end up with
different Value types after a RAUW operation. As such, we should
not assume that the vector only contains instructions.
Notably this matches the behavior of the
RecursivelyDeleteTriviallyDeadInstructions() function variant which
accepts a single value rather than vector.
More information about the All-commits