[llvm] Add debug location to strlen in LoopIdiomRecognize pass (PR #140164)
Amy Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 17:17:16 PDT 2025
================
@@ -1778,6 +1778,9 @@ bool LoopIdiomRecognize::recognizeAndInsertStrLen() {
}
assert(StrLenFunc && "Failed to emit strlen function.");
+ // Set debug location to the start of the loop.
+ cast<Instruction>(StrLenFunc)->setDebugLoc(CurLoop->getStartLoc());
----------------
amykhuang wrote:
Changed to set the debug location on the IRbuilder.
https://github.com/llvm/llvm-project/pull/140164
More information about the llvm-commits
mailing list