[PATCH] D42044: X86: Utilize ZeroableElements for canWidenShuffleElements
Zvi Rackover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 8 16:47:17 PDT 2018
zvi marked 3 inline comments as done.
zvi added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14571
+ for (int i = 0, e = Mask.size(); i != e; ++i)
+ if (Mask[i] != SM_SentinelUndef && Zeroable[i])
+ ZeroableMask[i] = SM_SentinelZero;
----------------
RKSimon wrote:
> Are there any cases where the zero entry came from V1 that could cause a problem?
Sorry i didn't understand the question.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14595
+ "V2's non-undef elements are used?!");
+ APInt Undefs(NewNumElts, -1);
+ SmallVector<APInt, 32> ZeroVecVals(NewNumElts,
----------------
RKSimon wrote:
> APInt Undefs = APInt::getAllOnesValue(NewNumElts);
Thanks, this code was removed from latest revision
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14597
+ SmallVector<APInt, 32> ZeroVecVals(NewNumElts,
+ APInt(NewEltVT.getSizeInBits(), 0));
+ for (int i = 0; i != NewNumElts; ++i)
----------------
RKSimon wrote:
> APInt::getNullValue(NewEltVT.getSizeInBits())
Thanks, this code was removed from latest revision
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14600
+ if (WidenedMask[i] == SM_SentinelZero) {
+ WidenedMask[i] = i > NewNumElts ? i : i + NewNumElts;
+ Undefs.clearBit(i);
----------------
RKSimon wrote:
> i > NewNumElts can't ever be true? And anyway, we expect the zero to have come from V2.
whoops. I fixed this in the latest revision
Repository:
rL LLVM
https://reviews.llvm.org/D42044
More information about the llvm-commits
mailing list