[PATCH] Improve Cost model for SLPVectorizer when we have a vector division by power of 2

hfinkel at anl.gov hfinkel at anl.gov
Tue Aug 19 12:29:05 PDT 2014


Should there also be a corresponding change in the loop vectorizer?

================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:335
@@ +334,3 @@
+    OK_UniformConstantValue,      // Operand is uniform constant.
+    OK_UniformConstantPowerOfTwo, // Operand is uniform constant power of 2.
+    OK_NonUniformConstantValue    // Operand is a non uniform constant value.
----------------
I wonder if this is the right design:
 1. This is really a subcase of the uniform constant case, and requires all implementations to handle the defaulting.
 2. We could have non-uniform values that are all powers of two.

Having some optional feature bits seems better. I imagine will want more special properties like this in the future.

http://reviews.llvm.org/D4971






More information about the llvm-commits mailing list