[PATCH] D43208: [LV][nearly NFC] Move isLegalMasked* functions from Legality to CostModel
Hideki Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 14:02:49 PST 2018
hsaito added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2042-2047
+ bool LI = isa<LoadInst>(V);
+ bool SI = isa<StoreInst>(V);
+ if (!LI && !SI)
+ return false;
+ auto *Ty = getMemInstValueType(V);
+ return (LI && isLegalMaskedGather(Ty)) || (SI && isLegalMaskedScatter(Ty));
----------------
dyn_cast<> abuse fixed. Code simplified a bit. Should be NFC.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6202
+ if (!EnableCondStoresVectorization && NumPredStores) {
+ ORE->emit(createMissedAnalysis("ConditionalStore")
----------------
Do we even want to keep this bail out?
================
Comment at: test/Transforms/LoopVectorize/conditional-assignment.ll:4
-; CHECK: remark: source.c:2:8: loop not vectorized: store that is conditionally executed prevents vectorization
+; CHECK: remark: source.c:2:8: the cost-model indicates that vectorization is not beneficial
----------------
I think the remark emission needs to be fixed so that it includes "loop not vectorized:". If so, I'll do that in a separate patch.
Repository:
rL LLVM
https://reviews.llvm.org/D43208
More information about the llvm-commits
mailing list