[llvm-branch-commits] [llvm] [LoongArch] Add shuffle and vector element cost hooks (PR #233033)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 16 23:48:18 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/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h --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/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp
index 6bd05ac6b..709c5f8d3 100644
--- a/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp
@@ -484,8 +484,7 @@ InstructionCost LoongArchTTIImpl::getVectorInstrCost(
if (Opcode == Instruction::ExtractElement && Index == 0 &&
Val->getScalarType()->isFloatingPointTy() && isSingleVRegType(ST, Val))
return 0;
- return BaseT::getVectorInstrCost(Opcode, Val, CostKind, Index, Op0, Op1,
- VIC);
+ return BaseT::getVectorInstrCost(Opcode, Val, CostKind, Index, Op0, Op1, VIC);
}
InstructionCost LoongArchTTIImpl::getShuffleCost(
@@ -512,6 +511,6 @@ InstructionCost LoongArchTTIImpl::getShuffleCost(
break;
}
}
- return BaseT::getShuffleCost(Kind, DstTy, SrcTy, CostKind, Mask, Index,
- SubTp, Args, CxtI, VIC);
+ return BaseT::getShuffleCost(Kind, DstTy, SrcTy, CostKind, Mask, Index, SubTp,
+ Args, CxtI, VIC);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/233033
More information about the llvm-branch-commits
mailing list