[llvm] [llvm][LSR] Fix where invariant on ScaledReg & Scale is violated (PR #112576)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 09:29:53 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 49fa91edf7704dc385d3a97ddb74b7348be10bc7 cea80f598aad84ecee656fe0c7822eddf56fc822 --extensions cpp -- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 28bd6318c0..e55b8f6652 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -622,7 +622,8 @@ static bool containsAddRecDependentOnLoop(const SCEV *S, const Loop &L) {
 /// representation.
 /// \see Formula::BaseRegs.
 bool Formula::isCanonical(const Loop &L) const {
-  assert((Scale == 0 || ScaledReg) && "ScaledReg must be non-null if Scale is non-zero");
+  assert((Scale == 0 || ScaledReg) &&
+         "ScaledReg must be non-null if Scale is non-zero");
 
   if (!ScaledReg)
     return BaseRegs.size() <= 1;

``````````

</details>


https://github.com/llvm/llvm-project/pull/112576


More information about the llvm-commits mailing list