[PATCH] D42044: X86: Utilize ZeroableElements for canWidenShuffleElements
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 05:54:50 PST 2018
RKSimon 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;
----------------
Are there any cases where the zero entry came from V1 that could cause a problem?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14595
+ "V2's non-undef elements are used?!");
+ APInt Undefs(NewNumElts, -1);
+ SmallVector<APInt, 32> ZeroVecVals(NewNumElts,
----------------
APInt Undefs = APInt::getAllOnesValue(NewNumElts);
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14597
+ SmallVector<APInt, 32> ZeroVecVals(NewNumElts,
+ APInt(NewEltVT.getSizeInBits(), 0));
+ for (int i = 0; i != NewNumElts; ++i)
----------------
APInt::getNullValue(NewEltVT.getSizeInBits())
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14600
+ if (WidenedMask[i] == SM_SentinelZero) {
+ WidenedMask[i] = i > NewNumElts ? i : i + NewNumElts;
+ Undefs.clearBit(i);
----------------
i > NewNumElts can't ever be true? And anyway, we expect the zero to have come from V2.
Repository:
rL LLVM
https://reviews.llvm.org/D42044
More information about the llvm-commits
mailing list