[llvm] [InstCombine] Fold binary op of reductions. (PR #121567)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 09:22:23 PST 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 bfa711a970d50c9101c8962609f9aad4f5395825 50c3ac4d27179e88f791dbb4b4835dccfe16468a --extensions h,cpp -- llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index e46857c819..b7af75664e 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2339,7 +2339,8 @@ Instruction *InstCombinerImpl::foldBinopOfReductions(BinaryOperator &Inst) {
if (ReductionIID == Intrinsic::not_intrinsic)
return nullptr;
- auto checkIntrinsicAndGetItsArgument = [](Value* V, Intrinsic::ID IID) -> Value * {
+ auto checkIntrinsicAndGetItsArgument = [](Value *V,
+ Intrinsic::ID IID) -> Value * {
IntrinsicInst *II = dyn_cast<IntrinsicInst>(V);
if (!II)
return nullptr;
@@ -2363,7 +2364,8 @@ Instruction *InstCombinerImpl::foldBinopOfReductions(BinaryOperator &Inst) {
if (PossiblyDisjointInst *PDInst = dyn_cast<PossiblyDisjointInst>(&Inst))
if (auto *PDVectorBO = dyn_cast<PossiblyDisjointInst>(VectorBO))
- PDVectorBO->setIsDisjoint(PDVectorBO->isDisjoint() && PDInst->isDisjoint());
+ PDVectorBO->setIsDisjoint(PDVectorBO->isDisjoint() &&
+ PDInst->isDisjoint());
Instruction *Rdx = Builder.CreateIntrinsic(ReductionIID, {VTy}, {VectorBO});
return Rdx;
``````````
</details>
https://github.com/llvm/llvm-project/pull/121567
More information about the llvm-commits
mailing list