[PATCH] D100273: [VectorCombine] Scalarize vector load/extract.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 11 14:15:48 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:784-804
+ auto *UI = dyn_cast<ExtractElementInst>(U);
+ if (!UI || UI->getParent() != LI->getParent())
+ return false;
+
+ // Check if any instruction between the load and the extract may modify
+ // memory.
+ if (LastCheckedInst->comesBefore(UI)) {
----------------
Since we would be extracting from the original value,
why do we care if it would have been overwritten sometimes later?
Can't we just emit all loads right where the wide load was?
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:806
+
+ auto *Index = dyn_cast<ConstantInt>(UI->getOperand(1));
+ OriginalCost +=
----------------
Do we expect that all the CSE have happened by now?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100273/new/
https://reviews.llvm.org/D100273
More information about the llvm-commits
mailing list