[PATCH] D81791: [X86][SSE] Add SimplifyDemandedVectorEltsForTargetShuffle to handle target shuffle variable masks.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 00:15:22 PDT 2020
RKSimon marked an inline comment as done.
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:36727
+ unsigned NumCstElts = cast<FixedVectorType>(C->getType())->getNumElements();
+ if (NumCstElts != NumElts && NumCstElts != (NumElts * 2))
+ return false;
----------------
craig.topper wrote:
> I think this check isn't enough if the load is narrower than the constant pool vector. For example a v16i8 load with a v32i8 constant pool. So NumCstElts == NumElts * 2 and we'll proceed.
>
> I think this is the cause of some failures we're seeing, but I don't have a reduced case yet.
Does checking that Mask.getValueSizeInBits() == C->getSizeInBits() as well help?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81791/new/
https://reviews.llvm.org/D81791
More information about the llvm-commits
mailing list