[PATCH] D100273: [VectorCombine] Scalarize vector load/extract.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 20 02:36:04 PDT 2021
RKSimon added a comment.
Anyone else got any comments?
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:876
+ // to memory.
+ if (NumInstChecked == 6 || I.mayWriteToMemory())
+ return false;
----------------
Pull out the magic number (MaxInstChecked = 6 ?)
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:888
+ FixedVT->getElementType(), GEP, EI->getName() + ".scalar"));
+ NewLoad->setAlignment(Align(1));
+ replaceValue(*EI, *NewLoad);
----------------
fhahn wrote:
> RKSimon wrote:
> > Why are you forcing the alignment ?
> I think we have to update the alignment of the scalar load, because after applying an offset to the pointer it may not be aligned as specified on the original load. I think we should be able to use the common alignment between the alignment on the load and the scalar type. WDYT?
Yes, using a common alignment would make more sense
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