[all-commits] [llvm/llvm-project] 706b22: [SimpleLoopUnswitch] Drop uses of instructions bef...

Daniil Suchkov via All-commits all-commits at lists.llvm.org
Wed May 27 04:26:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 706b22e3e446621b20befe1094c26e4eda133bc9
      https://github.com/llvm/llvm-project/commit/706b22e3e446621b20befe1094c26e4eda133bc9
  Author: Daniil Suchkov <suc-daniil at yandex.ru>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/test/Transforms/SimpleLoopUnswitch/dead-blocks-uses-in-unreachablel-blocks.ll

  Log Message:
  -----------
  [SimpleLoopUnswitch] Drop uses of instructions before block deletion

Currently if instructions defined in a block are used in unreachable
blocks and SimpleLoopUnswitch attempts deleting the block, it triggers
assertion "Uses remain when a value is destroyed!".
This patch fixes it by replacing all uses of instructions from BB with
undefs before BB deletion.

Reviewed By: asbirlea

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




More information about the All-commits mailing list