[PATCH] D85759: [SLPVectorizer] Fix regression from cost model refactoring

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 16:45:21 PDT 2020


tlively added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3597-3606
+      SmallVector<Type *, 4> ScalarTys;
+      for (unsigned op = 0, opc = CI->getNumArgOperands(); op != opc; ++op)
+        ScalarTys.push_back(CI->getArgOperand(op)->getType());
+
+      FastMathFlags FMF;
+      if (auto *FPMO = dyn_cast<FPMathOperator>(CI))
+        FMF = FPMO->getFastMathFlags();
----------------
aheejin wrote:
> Why are the type based path and the arg based path different? Are they supposed to, or it is a bug? But for this patch, maybe we can change this single line and get done?
I don't know why they are different, although there is a TODO to get rid of the difference. Unfortunately this fix doesn't work because `getTypeBasedIntrinsicInstrCost` is not in the TargetTransformInfo interface. I think the motivation for the previous refactoring was to remove it from the public interface.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85759/new/

https://reviews.llvm.org/D85759



More information about the llvm-commits mailing list