[PATCH] D72807: [InstCombine] Fix worklist management in DSE (PR44552)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 13:38:21 PST 2020


nikic marked an inline comment as done.
nikic added a comment.

I've added the complete original test case with `-instcombine-infinite-loop-threshold=2`. It would also be possible to reduce it (it just wouldn't need the full 1000 iterations that trigger the default threshold), but as the test now runs quickly even on a debug build, I figured keeping the original is fine.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1448
         eraseInstFromFunction(*PrevSI);
-        continue;
+        return nullptr;
       }
----------------
Technically this could stay `continue`, but I'm uncomfortable with the fact that this just falls through to potentially doing other transforms below. I think it's better to DCE things here and let the instruction be reprocessed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72807





More information about the llvm-commits mailing list