[llvm] [Debuginfo][GVNHoist] Fix #86227: update the debug location of the hoisted GEP (PR #86236)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 20:16:56 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 718fbbef5f18a2b7e7fc4f842b1452ae9bee581a bb428854b1cdc72312c67b2540217d00dd8793a7 -- llvm/lib/Transforms/Scalar/GVNHoist.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
index b95421d203..261c1259c9 100644
--- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -951,13 +951,13 @@ void GVNHoist::makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt,
OtherGep = cast<GetElementPtrInst>(
cast<StoreInst>(OtherInst)->getPointerOperand());
ClonedGep->andIRFlags(OtherGep);
-
+
// Merge debug locations of GEPs, because the hoisted GEP replaces those
- // in branches. When cloning, ClonedGep preserves the debug location of
+ // in branches. When cloning, ClonedGep preserves the debug location of
// Gepd, so Gep is skipped to avoid merging it twice.
if (OtherGep != Gep) {
- ClonedGep->applyMergedLocation(
- ClonedGep->getDebugLoc(), OtherGep->getDebugLoc());
+ ClonedGep->applyMergedLocation(ClonedGep->getDebugLoc(),
+ OtherGep->getDebugLoc());
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/86236
More information about the llvm-commits
mailing list