[PATCH] D119760: [DSE] Fall back to CFG scan for unreachable terminators.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 12:31:09 PST 2022


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1525
+      if (!AllPathsToExitThroughCommonPred && !AnyUnreachableExit)
         return None;
 
----------------
Should be sufficient to only change this branch?
```
if (!PDT.dominates(CommonPred, MaybeDeadAccess->getBlock())) {
  // Comment
  if (!AnyUnreachableExit)
    return None;
  CommonPred = nullptr;
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119760/new/

https://reviews.llvm.org/D119760



More information about the llvm-commits mailing list