[PATCH] D78895: [InstCombine][SVE] Fix visitInsertElementInst for scalable type.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 11:49:04 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:847
// --> shuf (inselt undef, X, 0), undef, <0,0,0,undef>
- unsigned NumMaskElts = Shuf->getType()->getNumElements();
+ unsigned NumMaskElts = Shuf->getShuffleMask().size();
SmallVector<int, 16> NewMask(NumMaskElts);
----------------
I'd prefer to bail out more aggressively here; I'm not sure this makes sense for scalable vectors.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:880
// inselt (shuf X, IdMask), (extelt X, IdxC), IdxC --> shuf X, IdMask'
- unsigned NumMaskElts = Shuf->getType()->getNumElements();
+ unsigned NumMaskElts = Shuf->getShuffleMask().size();
SmallVector<int, 16> NewMask(NumMaskElts);
----------------
I'd prefer to bail out more aggressively here; I'm not sure this makes sense for scalable vectors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78895/new/
https://reviews.llvm.org/D78895
More information about the llvm-commits
mailing list