[PATCH] D113350: [X86][Costmodel] `getReplicationShuffleCost()`: implement cost model for 32/64 bit-wide elements with AVX512F

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 07:14:31 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3632
+                                            DemandedReplicatedElts, CostKind);
+  };
+
----------------
Is this really useful?


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3730
+  for (int SrcEltIdx : seq(0, VF)) {
+    for (int Indice : seq(0, ReplicationFactor)) {
+      (void)Indice;
----------------
can't we extract the length of seq() ?


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3742
+         "FINAL CHECK: two algorithms should produce the same answer.");
+#endif
+
----------------
I'm really torn over whether this should be in the method or not :( I understand its use but its a LOT of debug code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113350



More information about the llvm-commits mailing list