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

hfinkel at anl.gov hfinkel at anl.gov
Thu Aug 21 04:23:47 PDT 2014


This LGTM (but please also get an okay from someone familiar with the X86 vector instructions).

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5838
@@ +5837,3 @@
+      Constant *SplatValue = cast<Constant>(Op2)->getSplatValue();
+      if (SplatValue != nullptr) {
+        ConstantInt *CInt = dyn_cast<ConstantInt>(SplatValue);
----------------
This can just be:
  if (SplatValue) {

http://reviews.llvm.org/D4971






More information about the llvm-commits mailing list