[llvm] [RISCV][CostModel] Estimate cost of llvm.vector.reduce.fmaximum/fminimum (PR #80697)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 17:48:19 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 992d8527585817af685bba0d82ed4e808bc613bb b58ac6188facc0267d0d9e2b46cf7978c147cc14 -- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index 4dea4ad36e..255c275f4a 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -985,12 +985,9 @@ RISCVTTIImpl::getMinMaxReductionCost(Intrinsic::ID IID, VectorType *Ty,
     MVT SubTy = LT.second;
     unsigned ReduceOp =
         IID == Intrinsic::maximum ? RISCV::VFMAX_VV : RISCV::VFMIN_VV;
-    unsigned Opcodes[] = {RISCV::VSLIDEDOWN_VI,
-                          RISCV::VMFEQ_VV,
-                          RISCV::VMERGE_VVM,
-                          RISCV::VMFEQ_VV,
-                          RISCV::VMERGE_VVM,
-                          ReduceOp};
+    unsigned Opcodes[] = {RISCV::VSLIDEDOWN_VI, RISCV::VMFEQ_VV,
+                          RISCV::VMERGE_VVM,    RISCV::VMFEQ_VV,
+                          RISCV::VMERGE_VVM,    ReduceOp};
     InstructionCost SplitCost = 0;
     while (SubTy.getVectorNumElements() > 1) {
       SubTy = SubTy.getHalfNumVectorElementsVT();

``````````

</details>


https://github.com/llvm/llvm-project/pull/80697


More information about the llvm-commits mailing list