mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Use the 'MadeChange' variable instead of returning 'false' all of the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -321,8 +321,7 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N,
|
|||||||
getOperandNum(x.SDTCisVTSmallerThanOp_Info.OtherOperandNum, N,NumResults);
|
getOperandNum(x.SDTCisVTSmallerThanOp_Info.OtherOperandNum, N,NumResults);
|
||||||
|
|
||||||
// It must be integer.
|
// It must be integer.
|
||||||
bool MadeChange = false;
|
bool MadeChange = OtherNode->UpdateNodeType(MVT::iAny, TP);
|
||||||
MadeChange |= OtherNode->UpdateNodeType(MVT::iAny, TP);
|
|
||||||
|
|
||||||
// This code only handles nodes that have one type set. Assert here so
|
// This code only handles nodes that have one type set. Assert here so
|
||||||
// that we can change this if we ever need to deal with multiple value
|
// that we can change this if we ever need to deal with multiple value
|
||||||
@@ -330,7 +329,7 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N,
|
|||||||
assert(OtherNode->getExtTypes().size() == 1 && "Node has too many types!");
|
assert(OtherNode->getExtTypes().size() == 1 && "Node has too many types!");
|
||||||
if (OtherNode->hasTypeSet() && OtherNode->getTypeNum(0) <= VT)
|
if (OtherNode->hasTypeSet() && OtherNode->getTypeNum(0) <= VT)
|
||||||
OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error.
|
OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error.
|
||||||
return false;
|
return MadeChange;
|
||||||
}
|
}
|
||||||
case SDTCisOpSmallerThanOp: {
|
case SDTCisOpSmallerThanOp: {
|
||||||
TreePatternNode *BigOperand =
|
TreePatternNode *BigOperand =
|
||||||
|
|||||||
Reference in New Issue
Block a user