[PATCH] D29631: SystemZTargetTransformInfo cost functions and some common code changes

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 23:39:36 PDT 2017


jonpa added inline comments.


================
Comment at: lib/Target/SystemZ/SystemZTargetTransformInfo.cpp:758
+    // Give a slight penalty for moving out of vector pipeline to FXU unit.
+    if (Index == 0 && Val->getScalarType()->isIntegerTy())
+      Cost += 1;
----------------
uweigand wrote:
> Why just index == 0 ? Shouldn't the penalty apply to any element?
While the extraction of any element still has a modeled cost of 1 per element, my idea with this is to penalize further the delay of the act of moving out of the vector pipeline. This would then not be per element, but rather for the whole vector register (thus added only once, at index 0). My assumption is that this happens at the point of scalarization, when all vector elements are extracted.


https://reviews.llvm.org/D29631





More information about the llvm-commits mailing list