1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

minor code simplification

llvm-svn: 26918
This commit is contained in:
Chris Lattner 2006-03-21 06:42:58 +00:00
parent 6417236c41
commit 4da595f4c8

View File

@ -698,17 +698,11 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
if (getNumChildren() != 1)
TP.error("Node transform '" + getOperator()->getName() +
"' requires one operand!");
unsigned char ExtType0 = getExtTypeNum(0);
unsigned char ChildExtType0 = getChild(0)->getExtTypeNum(0);
if (ExtType0 == MVT::isInt ||
ExtType0 == MVT::isFP ||
ExtType0 == MVT::isUnknown ||
ChildExtType0 == MVT::isInt ||
ChildExtType0 == MVT::isFP ||
ChildExtType0 == MVT::isUnknown) {
// If either the output or input of the xform does not have exact
// type info. We assume they must be the same. Otherwise, it is perfectly
// legal to transform from one type to a completely different type.
// If either the output or input of the xform does not have exact
// type info. We assume they must be the same. Otherwise, it is perfectly
// legal to transform from one type to a completely different type.
if (!hasTypeSet() || !getChild(0)->hasTypeSet()) {
bool MadeChange = UpdateNodeType(getChild(0)->getExtTypes(), TP);
MadeChange |= getChild(0)->UpdateNodeType(getExtTypes(), TP);
return MadeChange;