[PATCH] D26083: [LV] Scalarize operands of predicated instructions
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 08:35:49 PST 2016
mssimpso added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6688
+ else
+ ScalarCost += getScalarizationOverhead(ToVectorTy(J->getType(), VF),
+ false, true, TTI);
----------------
gilr wrote:
> 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?
That's right Gil. We also should check that J is actually contained in the loop before adding in the extract overhead. I had already added this to my working copy after uploading the last revision. But I'll upload a new revision with this change and Michael's comment suggestions for clarity. Thanks!
https://reviews.llvm.org/D26083
More information about the llvm-commits
mailing list