mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
While sinking an instruction, do not lose llvm.dbg.value intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -445,7 +445,8 @@ void LICM::sink(Instruction &I) {
|
||||
// enough that we handle it as a special (more efficient) case. It is more
|
||||
// efficient to handle because there are no PHI nodes that need to be placed.
|
||||
if (ExitBlocks.size() == 1) {
|
||||
if (!DT->dominates(I.getParent(), ExitBlocks[0])) {
|
||||
if (!isa<DbgInfoIntrinsic>(I) &&
|
||||
!DT->dominates(I.getParent(), ExitBlocks[0])) {
|
||||
// Instruction is not used, just delete it.
|
||||
CurAST->deleteValue(&I);
|
||||
// If I has users in unreachable blocks, eliminate.
|
||||
|
Reference in New Issue
Block a user