[llvm] [GlobalISel] Add computeNumSignBits for ASHR (PR #139503)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 00:44:38 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,h -- llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
index 01246f703..4e029d179 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
@@ -1861,7 +1861,8 @@ unsigned GISelValueTracking::computeNumSignBits(Register R,
Register Src1 = MI.getOperand(1).getReg();
Register Src2 = MI.getOperand(2).getReg();
FirstAnswer = computeNumSignBits(Src1, DemandedElts, Depth + 1);
- if (auto C = getValidMinimumShiftAmount(Src2, TyBits, DemandedElts, Depth + 1))
+ if (auto C =
+ getValidMinimumShiftAmount(Src2, TyBits, DemandedElts, Depth + 1))
FirstAnswer = std::min<uint64_t>(FirstAnswer + *C, TyBits);
break;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/139503
More information about the llvm-commits
mailing list