[PATCH] D86160: [VectorCombine] allow vector loads with mismatched insert type
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 13:48:03 PDT 2020
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:150
+ SmallVector<int, 16> Mask(Ty->getNumElements());
+ std::iota(Mask.begin(), Mask.end(), 0);
+ VecLd = Builder.CreateShuffleVector(VecLd, UndefValue::get(VectorTy), Mask);
----------------
RKSimon wrote:
> Are we in danger of creating out of bounds shuffle mask indices if the dst vector type is more than 2x the original size (v2f32 -> v16f32 etc.) ? I think they canonicalize to undef but I'm not sure (+ have no access to the source tree atm)
Nice catch - yes, that would crash on creation. Adjusted one of the tests to verify that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86160/new/
https://reviews.llvm.org/D86160
More information about the llvm-commits
mailing list