mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
[SDAG] At the suggestion of Hal, switch to an output parameter that
tracks which elements of the build vector are in fact undef. This should make actually inpsecting them (likely in my next patch) reasonably pretty. Also makes the output parameter optional as it is clear now that *most* users are happy with undefs in their splats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212581 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -655,13 +655,13 @@ static ConstantSDNode *isConstOrConstSplat(SDValue N) {
|
||||
return CN;
|
||||
|
||||
if (BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(N)) {
|
||||
bool HasUndefElements;
|
||||
ConstantSDNode *CN = BV->getConstantSplatNode(HasUndefElements);
|
||||
BitVector UndefElements;
|
||||
ConstantSDNode *CN = BV->getConstantSplatNode(&UndefElements);
|
||||
|
||||
// BuildVectors can truncate their operands. Ignore that case here.
|
||||
// FIXME: We blindly ignore splats which include undef which is overly
|
||||
// pessimistic.
|
||||
if (CN && !HasUndefElements &&
|
||||
if (CN && UndefElements.none() &&
|
||||
CN->getValueType(0) == N.getValueType().getScalarType())
|
||||
return CN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user