[llvm] [DeadStoreElimination] Optimize tautological assignments (PR #75744)

Shreyansh Chouhan via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 13 08:06:27 PST 2024


================
@@ -1901,6 +1901,52 @@ 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) {
+    StoreInst *StoreI = dyn_cast<StoreInst>(Def->getMemoryInst());
----------------
BK1603 wrote:

o I see, thanks. Will keep this in mind!

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


More information about the llvm-commits mailing list