[PATCH] D126885: [SLP]Cost for a constant buildvector.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 10:17:22 PDT 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3807
+  case Instruction::FCmp:
+    if (Idx == 1)
+      return TTI::TCC_Free;
----------------
RKSimon wrote:
> Instruction::Add/Sub?
> 
> Also, we'd need to allow Idx ==0 || Idx == 1 for commutable ops.
1. I excluded Add/Sub here because scalar Add/Sub with Imm has less cost than the vector Add/Subs (0.2-0.33 vs ~0.5)
2. We can add it later, currently no such kind of analysis in getIntImmCostInst


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126885



More information about the llvm-commits mailing list