[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:23:31 PST 2024
================
@@ -2770,15 +2770,31 @@ bool llvm::replaceAllDbgUsesWith(Instruction &From, Value &To,
return false;
}
+void llvm::handleUnreachableTerminator(Instruction *I) {
+ // RemoveDIs: erase debug-info on this instruction manually.
+ I->dropDbgValues();
+ unsigned Opcode = I->getOpcode();
+ if (Opcode >= Instruction::Ret && Opcode <= Instruction::Invoke &&
----------------
nikic wrote:
Is there some specific terminator for which you think this transform will break something? If not, please handle all of them without extra checks.
https://github.com/llvm/llvm-project/pull/78444
More information about the llvm-commits
mailing list