[PATCH] D85127: [ArgPromotion] Replace all md uses of promoted values with undef.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 05:40:32 PDT 2020


fhahn created this revision.
fhahn added reviewers: arsenm, aprantl, vsk, uabelho.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
fhahn requested review of this revision.
Herald added a subscriber: wdng.

Currently, ArgPromotion may leave metadata uses of promoted values,
which will end up in the wrong function, creating invalid IR.

PR33641 fixed this for dead arguments, but it can be also be triggered
arguments with users that are promoted (see the updated test case).

We also have to drop uses to them after promoting them. We need to do
this after dealing with the non-metadata uses, so I also moved the empty
use case to the loop that deals with updating the arguments of the new
function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85127

Files:
  llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
  llvm/test/Transforms/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85127.282602.patch
Type: text/x-patch
Size: 4166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200803/e7ff65db/attachment.bin>


More information about the llvm-commits mailing list