[llvm] [InstCombine] If inst in unreachable refers to an inst change it to poison (#65107) (PR #78444)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 05:26:07 PST 2024
================
@@ -3100,9 +3100,8 @@ void InstCombinerImpl::handleUnreachableFrom(
MadeIRChange = true;
}
- // RemoveDIs: to match behaviour in dbg.value mode, drop debug-info on
- // terminator too.
- BB->getTerminator()->dropDbgValues();
+ // if terminator refer instruction, transform it into poison.
+ handleUnreachableTerminator(BB->getTerminator());
----------------
nikic wrote:
```suggestion
MadeIRChange |= handleUnreachableTerminator(BB->getTerminator());
```
and return whether a change was made from that function.
https://github.com/llvm/llvm-project/pull/78444
More information about the llvm-commits
mailing list