Skip to content

Commit 0daa07e

Browse files
author
Devang Patel
committed
preserve line number info.
llvm-svn: 130869
1 parent 3bd79ba commit 0daa07e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,15 @@ processLoopStoreOfLoopLoad(StoreInst *SI, unsigned StoreSize,
589589
Value *NumBytes =
590590
Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator());
591591

592-
Value *NewCall =
592+
CallInst *NewCall =
593593
Builder.CreateMemCpy(StoreBasePtr, LoadBasePtr, NumBytes,
594594
std::min(SI->getAlignment(), LI->getAlignment()));
595+
NewCall->setDebugLoc(SI->getDebugLoc());
595596

596597
DEBUG(dbgs() << " Formed memcpy: " << *NewCall << "\n"
597598
<< " from load ptr=" << *LoadEv << " at: " << *LI << "\n"
598599
<< " from store ptr=" << *StoreEv << " at: " << *SI << "\n");
599-
(void)NewCall;
600+
600601

601602
// Okay, the memset has been formed. Zap the original store and anything that
602603
// feeds into it.

0 commit comments

Comments
 (0)