[MachineLICM] Assert that locations from debug insts are not lost
authorVedant Kumar <vsk@apple.com>
Wed, 27 May 2020 20:13:13 +0000 (13:13 -0700)
committerVedant Kumar <vsk@apple.com>
Thu, 28 May 2020 20:53:40 +0000 (13:53 -0700)
commit0aa201eaf97681f59b72baee6552aa1b9b5c9129
treedde567ba7aa3d43a9aab6bd8e0f49e61e2c4f210
parent9d065477942ffa6d9085188c0d1d2cb95a41baf6
[MachineLICM] Assert that locations from debug insts are not lost

Summary:
Assert that MachineLICM does not move a debug instruction and then drop
its debug location. Later passes require each debug instruction to have
a location.

Testing: check-llvm, clang stage2 RelWithDebInfo build (x86_64)

Reviewers: aprantl, davide, chrisjackson, jmorse

Subscribers: hiraditya, asbirlea, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80665
llvm/lib/CodeGen/MachineLICM.cpp