diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index c6962e5..0bf9003 100644 --- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -297,6 +297,10 @@ static void buildPartialInvariantUnswitchConditionalBranch( for (auto *Val : reverse(ToDuplicate)) { Instruction *Inst = cast<Instruction>(Val); Instruction *NewInst = Inst->clone(); + + if (const DebugLoc &DL = Inst->getDebugLoc()) + mapAtomInstance(DL, VMap); + NewInst->insertInto(&BB, BB.end()); RemapInstruction(NewInst, VMap, RF_NoModuleLevelChanges | RF_IgnoreMissingLocals); |