[PATCH] D48404: Don't modify LibFuncs in DeadArgumentElimination or ArgumentPromotion

Jacob Gravelle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 12:39:02 PDT 2018


jgravelle-google added a comment.

> Better would be the appropriate subdirectory of test/Transforms.

In theory because the actual crash is in DeadStoreElimination I could put it there?

> Although you should split your test - one for dead arg elim and one for arg promotion.

I figured because it was the same input bitcode that causes issues it made sense to keep it as one file. Although it might make more sense to have it be two separate calls to `opt` to make it clearer.
The other thought was I don't want *any* passes in -std-link-opts to cause this issue, so this test should catch new passes that overlook the same weird edge case.
The minimal subset of reproducing passes for the first case is `-internalize -ipsccp -deadargelim -dse`

> What happens without this patch - incorrect behavior or other missed optimization opportunities? Are we losing anything important by preventing the optimizations?

Edited the commit message to make it clearer what the problem was - we crash in DeadStoreElimination. (Specifically here: https://github.com/llvm-mirror/llvm/blob/5119d140c565456349a27c45b52be5a81b18ffe0/lib/Transforms/Scalar/DeadStoreElimination.cpp#L216)


Repository:
  rL LLVM

https://reviews.llvm.org/D48404





More information about the llvm-commits mailing list