[PATCH] D26083: [LV] Scalarize operands of predicated instructions

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 07:56:47 PST 2016


gilr added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6688
+        else
+          ScalarCost += getScalarizationOverhead(ToVectorTy(J->getType(), VF),
+                                                 false, true, TTI);
----------------
Is there scalarization overhead if canBeScalarized(J) is false due to isScalarAfterVectorization(J)?
More generally, shouldn't this line be under a !isScalarAfterVectorization(J) condition? We may have bailed out e.g. due to J being on a different basic block but J itself may be scalar (meaning we've "smoothed" a scalar-vector-scalar sequence). Is that correct?


https://reviews.llvm.org/D26083





More information about the llvm-commits mailing list