[PATCH] D140260: [LoopVectorize] Fix crash on "vector->scalar" bitcast vectorization
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 05:42:44 PST 2022
lebedev.ri added a comment.
In D140260#4004038 <https://reviews.llvm.org/D140260#4004038>, @mdchen wrote:
> In D140260#4003727 <https://reviews.llvm.org/D140260#4003727>, @lebedev.ri wrote:
>
>> It think the loop-invariantness precondition for these is overly restrictive.
>
> Any suggestion on that?
For context. loading i64 and loading <8 x i8> and bitcasting to i64 should be the same thing.
> IIUC there's also some inconsistency as the current legality check fails if `ExtractElementInst` is found:
>
> // Check that the instruction return type is vectorizable.
> // Also, we can't vectorize extractelement instructions.
> if ((!VectorType::isValidElementType(I.getType()) &&
> !I.getType()->isVoidTy()) ||
> isa<ExtractElementInst>(I)) {
> reportVectorizationFailure("Found unvectorizable type",
> "instruction return type cannot be vectorized",
> "CantVectorizeInstructionReturnType", ORE, TheLoop, &I);
> return false;
> }
>
> which I suppose is uniform.
I'm not really familiar with this area, so i can't quite help with this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140260/new/
https://reviews.llvm.org/D140260
More information about the llvm-commits
mailing list