File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -1764,6 +1764,7 @@ bool LoopIdiomRecognize::recognizeAndInsertStrLen() {
17641764 }
17651765
17661766 IRBuilder<> Builder (Preheader->getTerminator ());
1767+ Builder.SetCurrentDebugLocation (CurLoop->getStartLoc ());
17671768 SCEVExpander Expander (*SE, Preheader->getModule ()->getDataLayout (),
17681769 " strlen_idiom" );
17691770 Value *MaterialzedBase = Expander.expandCodeFor (
@@ -1778,9 +1779,6 @@ bool LoopIdiomRecognize::recognizeAndInsertStrLen() {
17781779 }
17791780 assert (StrLenFunc && " Failed to emit strlen function." );
17801781
1781- // Set debug location to the start of the loop.
1782- cast<Instruction>(StrLenFunc)->setDebugLoc (CurLoop->getStartLoc ());
1783-
17841782 const SCEV *StrlenEv = SE->getSCEV (StrLenFunc);
17851783 SmallVector<PHINode *, 4 > Cleanup;
17861784 for (PHINode &PN : LoopExitBB->phis ()) {
You can’t perform that action at this time.
0 commit comments