[llvm-branch-commits] [RISCV][TTI] Adjust the cost of `llvm.abs` intrinsic when `Zvabd` exists (PR #180146)
Craig Topper via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Feb 6 09:27:27 PST 2026
================
@@ -1577,6 +1577,11 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
case Intrinsic::abs: {
auto LT = getTypeLegalizationCost(RetTy);
if (ST->hasVInstructions() && LT.second.isVector()) {
+ // vabs.v v10, v8
+ if (ST->hasStdExtZvabd())
----------------
topperc wrote:
oh nevermind, only vabsd has the element size restriction.
https://github.com/llvm/llvm-project/pull/180146
More information about the llvm-branch-commits
mailing list