around the handling of UNDEF lanes in boolean vector content analysis.
The code before my changes here also failed to check for non-constant
splats in a buildvector. I have no idea how to trigger this, I just
spotted by inspection when trying to understand the code. It seems
extremely unlikely to be worth the trouble to teach the only caller of
this code (DAG combining setcc patterns) how to cleverly handle undef
lanes, so I've just commented more thoroughly that we're giving up
there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212515
91177308-0d34-0410-b5e6-
96231b3b80d8
IsVec = true;
bool HasUndefElements;
CN = BV->getConstantSplatNode(HasUndefElements);
- if (HasUndefElements)
- return false; // Can't blindly collapse the undef values.
+ // Only interested in constant splats, and we don't try to handle undef
+ // elements in identifying boolean constants.
+ if (!CN || HasUndefElements)
+ return false;
}
switch (getBooleanContents(IsVec)) {
IsVec = true;
bool HasUndefElements;
CN = BV->getConstantSplatNode(HasUndefElements);
- if (HasUndefElements)
- return false; // Can't blindly collapse the undef values.
+ // Only interested in constant splats, and we don't try to handle undef
+ // elements in identifying boolean constants.
+ if (!CN || HasUndefElements)
+ return false;
}
if (getBooleanContents(IsVec) == UndefinedBooleanContent)