[llvm] [RISCV][TTI] Add cost model for ROTL/ROTR (PR #170824)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 09:07:39 PST 2025
================
@@ -1559,6 +1559,20 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
}
break;
}
+ case Intrinsic::fshl:
+ case Intrinsic::fshr: {
+ // Funnel-shifts are ROTL/ROTR when the first and second operand are equal.
----------------
topperc wrote:
Do we need to check `ICA.getArgs().empty()` like AArch64?
https://github.com/llvm/llvm-project/pull/170824
More information about the llvm-commits
mailing list