[all-commits] [llvm/llvm-project] 1e392f: [ArgPromotion] Replace all md uses of promoted val...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Aug 3 11:32:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e392fc44584a4909b4dced02b8386b48963002b
      https://github.com/llvm/llvm-project/commit/1e392fc44584a4909b4dced02b8386b48963002b
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    M llvm/test/Transforms/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll

  Log Message:
  -----------
  [ArgPromotion] Replace all md uses of promoted values with undef.

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.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D85127




More information about the All-commits mailing list