[all-commits] [llvm/llvm-project] e7c9a6: [SDAG] Don't move DBG_VALUE instructions after ins...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jan 24 01:51:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7c9a6cae09d99388d8384ca7c0fb5b24b353975
      https://github.com/llvm/llvm-project/commit/e7c9a6cae09d99388d8384ca7c0fb5b24b353975
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-24 (Mon, 24 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
    A llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll

  Log Message:
  -----------
  [SDAG] Don't move DBG_VALUE instructions after insertion point during scheduling (PR53243)

EmitSchedule() shouldn't be touching instructions after the provided
insertion point. The change introduced in D83561 performs a scan to
the end of the block, and thus may move unrelated instructions. In
particular, this ends up moving instructions that have been produced
by FastISel and will later be deleted. Moving them means that more
instructions than intended are removed.

Fix this by stopping the iteration when the insertion point is
reached.

Fixes https://github.com/llvm/llvm-project/issues/53243.

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




More information about the All-commits mailing list