[llvm] use multiplication with holes for 32-bit/64-bit clmul fallback (PR #203727)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 13 14:00:23 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 h,cpp -- llvm/include/llvm/CodeGen/BasicTTIImpl.h llvm/lib/CodeGen/SelectionDAG/TargetLowering.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/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index b11057695..e4871ab27 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -3100,7 +3100,8 @@ public:
InstructionCost MulCost =
thisT()->getArithmeticInstrCost(Instruction::Mul, RetTy, CostKind);
- // When the multiplication with holes approach is used, that emits 16 MULs, 8
+ // When the multiplication with holes approach is used, that emits 16
+ // MULs, 8
// + 4 ANDs, 12 XORs and 3 ORs.
if (BW >= 32 && BW <= 64 &&
TLI->isOperationLegalOrCustom(ISD::MUL,
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 175a41aa5..d5eca1ff0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -8899,7 +8899,7 @@ SDValue TargetLowering::expandCLMUL(SDNode *Node, SelectionDAG &DAG) const {
// calculation in BasicTTIImpl::getTypeBasedIntrinsicInstrCost for
// Intrinsic::clmul.
- // Strategy 4: multiplication with holes.
+ // Strategy 4: multiplication with holes.
//
// Uses "holes" (sequences of zeroes) to avoid carry spilling. When carries
// do occur, they wind up in a "hole" and are subsequently masked out of the
``````````
</details>
https://github.com/llvm/llvm-project/pull/203727
More information about the llvm-commits
mailing list