mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +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:
@ -1158,11 +1158,11 @@ bool TargetLowering::isConstTrueVal(const SDNode *N) const {
|
||||
return false;
|
||||
|
||||
IsVec = true;
|
||||
bool HasUndefElements;
|
||||
CN = BV->getConstantSplatNode(HasUndefElements);
|
||||
BitVector UndefElements;
|
||||
CN = BV->getConstantSplatNode(&UndefElements);
|
||||
// Only interested in constant splats, and we don't try to handle undef
|
||||
// elements in identifying boolean constants.
|
||||
if (!CN || HasUndefElements)
|
||||
if (!CN || UndefElements.none())
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1190,11 +1190,11 @@ bool TargetLowering::isConstFalseVal(const SDNode *N) const {
|
||||
return false;
|
||||
|
||||
IsVec = true;
|
||||
bool HasUndefElements;
|
||||
CN = BV->getConstantSplatNode(HasUndefElements);
|
||||
BitVector UndefElements;
|
||||
CN = BV->getConstantSplatNode(&UndefElements);
|
||||
// Only interested in constant splats, and we don't try to handle undef
|
||||
// elements in identifying boolean constants.
|
||||
if (!CN || HasUndefElements)
|
||||
if (!CN || UndefElements.none())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user