[llvm] [LLVM][SCEV] Look through common multiplicand when simplifying compares. (PR #141798)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 08:15:21 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Analysis/ScalarEvolution.cpp llvm/unittests/Analysis/ScalarEvolutionTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
index a211d44ba..8eb5ecd2e 100644
--- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
@@ -1788,8 +1788,8 @@ TEST_F(ScalarEvolutionsTest, SimplifyICmpOperandsCommutability) {
     const SCEV *B = SE.getSCEV(getArgByName(F, "b"));
     const SCEV *VS = SE.getSCEV(getInstructionByName(F, "c"));
     const SCEV *Two = SE.getConstant(A->getType(), 2);
-    SCEV::NoWrapFlags Flags = ScalarEvolution::setFlags(SCEV::FlagNUW,
-                                                        SCEV::FlagNSW);
+    SCEV::NoWrapFlags Flags =
+        ScalarEvolution::setFlags(SCEV::FlagNUW, SCEV::FlagNSW);
 
     SmallVector<const SCEV *, 2> Ops0 = {A, VS};
     SmallVector<const SCEV *, 2> Ops1 = {B, VS};

``````````

</details>


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


More information about the llvm-commits mailing list