[PATCH] D97465: [LoopVectorize] Refine hasIrregularType predicate
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 04:32:30 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:380-381
+ // This is only true if there is no padding between the array elements.
return DL.getTypeAllocSizeInBits(Ty) != DL.getTypeSizeInBits(Ty);
}
----------------
LemonBoy wrote:
> lebedev.ri wrote:
> > I wonder why can't we still vectorize such cases,
> > by instead loading `<N x DL.getTypeAllocSizeInBits(Ty)>` vector and then truncating it?
> > (beware of endianness)
> This was meant to be a hotfix targeting LLVM12.
> I've experimented with the widen+truncate strategy and the results are promising (at least on x86), I'll submit a patch once I clean up the code.
>
>
> This was meant to be a hotfix targeting LLVM12.
Sure, i wasn't even suggesting doing that here.
> I've experimented with the widen+truncate strategy and the results are promising (at least on x86), I'll submit a patch once I clean up the code.
Nice!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97465/new/
https://reviews.llvm.org/D97465
More information about the llvm-commits
mailing list