[llvm] [SCEV] Avoid redundant ValueExprMap lookups in forgetValue (PR #201573)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 05:46:58 PDT 2026
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 origin/main HEAD --extensions cpp -- llvm/lib/Analysis/ScalarEvolution.cpp llvm/unittests/Analysis/ScalarEvolutionTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</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 443a510e8..165845042 100644
--- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
@@ -1672,14 +1672,13 @@ TEST_F(ScalarEvolutionsTest, ForgetValueWithOverflowInst) {
TEST_F(ScalarEvolutionsTest, ForgetValueAddChainFolding) {
LLVMContext C;
SMDiagnostic Err;
- std::unique_ptr<Module> M = parseAssemblyString(
- "define i32 @foo(i32 %x) { "
- " %add1 = add i32 %x, 1 "
- " %add2 = add i32 %add1, 1 "
- " %add3 = add i32 %add2, 1 "
- " ret i32 %add3 "
- "} ",
- Err, C);
+ std::unique_ptr<Module> M = parseAssemblyString("define i32 @foo(i32 %x) { "
+ " %add1 = add i32 %x, 1 "
+ " %add2 = add i32 %add1, 1 "
+ " %add3 = add i32 %add2, 1 "
+ " ret i32 %add3 "
+ "} ",
+ Err, C);
ASSERT_TRUE(M && "Could not parse module?");
ASSERT_TRUE(!verifyModule(*M) && "Must have been well formed!");
``````````
</details>
https://github.com/llvm/llvm-project/pull/201573
More information about the llvm-commits
mailing list