aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-01-05 17:52:54 +0000
committerBob Wilson <bob.wilson@apple.com>2009-01-05 17:52:54 +0000
commit8688f554bbe44b39efa72a60ac70bc09c7b23fda (patch)
treeed370989e4f461e796b75987784a670513a07425 /utils
parentbbca50bc7b115d6de34d231faecffe4126e3c658 (diff)
downloadexternal_llvm-8688f554bbe44b39efa72a60ac70bc09c7b23fda.zip
external_llvm-8688f554bbe44b39efa72a60ac70bc09c7b23fda.tar.gz
external_llvm-8688f554bbe44b39efa72a60ac70bc09c7b23fda.tar.bz2
Handle iAny and fAny types in TreePatternNode::UpdateNodeType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index 9cfd980..e70bdb6 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -482,8 +482,9 @@ bool TreePatternNode::UpdateNodeType(const std::vector<unsigned char> &ExtVTs,
}
}
}
-
- if (ExtVTs[0] == EMVT::isInt && EMVT::isExtIntegerInVTs(getExtTypes())) {
+
+ if ((ExtVTs[0] == EMVT::isInt || ExtVTs[0] == MVT::iAny) &&
+ EMVT::isExtIntegerInVTs(getExtTypes())) {
assert(hasTypeSet() && "should be handled above!");
std::vector<unsigned char> FVTs = FilterEVTs(getExtTypes(), isInteger);
if (getExtTypes() == FVTs)
@@ -502,7 +503,8 @@ bool TreePatternNode::UpdateNodeType(const std::vector<unsigned char> &ExtVTs,
return true;
}
}
- if (ExtVTs[0] == EMVT::isFP && EMVT::isExtFloatingPointInVTs(getExtTypes())) {
+ if ((ExtVTs[0] == EMVT::isFP || ExtVTs[0] == MVT::fAny) &&
+ EMVT::isExtFloatingPointInVTs(getExtTypes())) {
assert(hasTypeSet() && "should be handled above!");
std::vector<unsigned char> FVTs =
FilterEVTs(getExtTypes(), isFloatingPoint);
@@ -517,9 +519,9 @@ bool TreePatternNode::UpdateNodeType(const std::vector<unsigned char> &ExtVTs,
//
// Similarly, we should probably set the type here to the intersection of
// {isInt|isFP} and ExtVTs
- if ((getExtTypeNum(0) == EMVT::isInt &&
+ if (((getExtTypeNum(0) == EMVT::isInt || getExtTypeNum(0) == MVT::iAny) &&
EMVT::isExtIntegerInVTs(ExtVTs)) ||
- (getExtTypeNum(0) == EMVT::isFP &&
+ ((getExtTypeNum(0) == EMVT::isFP || getExtTypeNum(0) == MVT::fAny) &&
EMVT::isExtFloatingPointInVTs(ExtVTs))) {
setTypes(ExtVTs);
return true;