[llvm] [VectorCombine] Fold binary op of reductions. (PR #121567)
Mikhail Gudim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 00:53:52 PST 2025
================
@@ -1182,6 +1183,135 @@ bool VectorCombine::foldExtractedCmps(Instruction &I) {
return true;
}
+static void analyzeCostOfVecReduction(const IntrinsicInst &II,
+ TTI::TargetCostKind CostKind,
+ const TargetTransformInfo &TTI,
+ InstructionCost &CostBeforeReduction,
+ InstructionCost &CostAfterReduction) {
+ using namespace llvm::PatternMatch;
+ Instruction *Op0, *Op1;
+ Instruction *RedOp = dyn_cast<Instruction>(II.getOperand(0));
+ VectorType *VecRedTy = cast<VectorType>(II.getOperand(0)->getType());
----------------
mgudim wrote:
done
https://github.com/llvm/llvm-project/pull/121567
More information about the llvm-commits
mailing list