[llvm] [InstCombine] If inst in unreachable refers to an inst change it to poison (#65107) (PR #78444)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 10:33:30 PST 2024


================
@@ -357,6 +357,13 @@ Value *salvageDebugInfoImpl(Instruction &I, uint64_t CurrentLocOps,
 bool replaceAllDbgUsesWith(Instruction &From, Value &To, Instruction &DomPoint,
                            DominatorTree &DT);
 
+/// If a terminator in an unreachable basic block has an operand of type
+/// Instruction, transform it into poison. Return true if any operands
+/// are changed to poison. Original Values prior to being changed to poison
+/// are returned to PoisonedValues.
----------------
dtcxzyw wrote:

```suggestion
/// are returned in \p PoisonedValues.
```

https://github.com/llvm/llvm-project/pull/78444


More information about the llvm-commits mailing list