[llvm] [SLP]Use getExtendedReduction cost and fix reduction cost calculations (PR #117350)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 10:12:18 PST 2024


================
@@ -2765,6 +2765,18 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
                                            Type *ResTy, VectorType *Ty,
                                            FastMathFlags FMF,
                                            TTI::TargetCostKind CostKind) {
+    if (auto *FTy = dyn_cast<FixedVectorType>(Ty);
+        FTy && Opcode == Instruction::Add &&
----------------
preames wrote:

You're missing the IsUnsigned check here - this allows sext too.  

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


More information about the llvm-commits mailing list