[llvm] [LV] Autovectorization for the all-in-one histogram intrinsic (PR #91458)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 08:03:07 PDT 2024


================
@@ -6771,8 +6776,33 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, ElementCount VF,
     // We've proven all lanes safe to speculate, fall through.
     [[fallthrough]];
   case Instruction::Add:
+  case Instruction::Sub: {
+    auto Info = Legal->getHistogramInfo(I);
----------------
fhahn wrote:

AFAICT we are still adding the costs for the load/store replaced by the histogram?

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


More information about the llvm-commits mailing list