[llvm] [SelectionDAG] Emit a more efficient magic number multiplication for exact udivs (PR #87161)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 08:14:10 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 cce4dc7b7a80347c2ef9ad3d55091dbe7adddcb6 9196d84795a9c0a1b693d7b9ea5c81c6715b11c3 -- llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index 1d1df171d0..e71ecb7232 100644
--- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@ -5197,7 +5197,8 @@ bool CombinerHelper::matchUDivByConst(MachineInstr &MI) {
return false;
}
- return matchUnaryPredicate(MRI, RHS, [](const Constant *C) { return C && !C->isZeroValue(); });
+ return matchUnaryPredicate(
+ MRI, RHS, [](const Constant *C) { return C && !C->isZeroValue(); });
}
void CombinerHelper::applyUDivByConst(MachineInstr &MI) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/87161
More information about the llvm-commits
mailing list