[PATCH] D109417: Cost model for VPMemory operations on PowerPC.

Roland Froese via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 12:12:38 PDT 2021


RolandF added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:1398
+    // will flush a full pipeline about half the time.
+    // The cost when this happens is about 80 cycles.
+    return P9PipelineFlushEstimate / 2;
----------------
I don't follow this reasoning.  Maybe 64-bit data is aligned half the time, but how is that true for char data for instance?


================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:1434
+      NumElems * BaseT::getMemoryOpCost(Opcode, SrcVTy->getScalarType(),
+                                        Alignment, AddressSpace, CostKind);
+  assert(ScalarMemOpInstrCost.isValid() && "Expected valid instruction cost");
----------------
The scalar loads have scalar type results.  I assume if the code is being vectorized and the function of a vector load is being replaced, the results have to go in a vector.  I think there is some insert cost here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109417



More information about the llvm-commits mailing list