[llvm] [DeadStoreElimination] Optimize tautological assignments (PR #75744)
Shreyansh Chouhan via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 21:00:00 PST 2024
================
@@ -1901,6 +1901,51 @@ struct DSEState {
return true;
}
+ // Check if there is a dominating condition, that implies that the value
+ // being stored in a ptr is already present in the ptr.
+ bool dominatingConditionImpliesValue(MemoryDef *Def) {
+ auto *StoreI = dyn_cast<StoreInst>(Def->getMemoryInst());
----------------
BK1603 wrote:
We should only reach this function if the store is valid (we check for `Store` before calling this)
https://github.com/llvm/llvm-project/pull/75744
More information about the llvm-commits
mailing list