[llvm] [ValueTracking] Fix KnownBits conflict for calls (range vs returned) (PR #84353)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 10:13:22 PST 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 3714f937b835c06c8c32ca4f3f61ba2317db2296 bdbf290ed97417a45feafe3a73dc32c1885ed4a5 -- llvm/lib/Analysis/ValueTracking.cpp llvm/unittests/Analysis/ValueTrackingTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 6c6897d83a..0a79e09196 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -2360,13 +2360,12 @@ TEST_F(ComputeKnownBitsTest, ComputeKnownBitsFreeze) {
}
TEST_F(ComputeKnownBitsTest, ComputeKnownBitsReturnedRangeConflict) {
- parseAssembly(
- "declare i16 @foo(i16 returned)\n"
- "\n"
- "define i16 @test() {\n"
- " %A = call i16 @foo(i16 4095), !range !{i16 32, i16 33}\n"
- " ret i16 %A\n"
- "}\n");
+ parseAssembly("declare i16 @foo(i16 returned)\n"
+ "\n"
+ "define i16 @test() {\n"
+ " %A = call i16 @foo(i16 4095), !range !{i16 32, i16 33}\n"
+ " ret i16 %A\n"
+ "}\n");
// The call returns 32 according to range metadata, but 4095 according to the
// returned arg operand. Given the conflicting information we expect that the
// known bits information simply is cleared.
``````````
</details>
https://github.com/llvm/llvm-project/pull/84353
More information about the llvm-commits
mailing list