[llvm-commits] [llvm] r61713 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Bob Wilson
bob.wilson at apple.com
Mon Jan 5 09:52:54 PST 2009
Author: bwilson
Date: Mon Jan 5 11:52:54 2009
New Revision: 61713
URL: http://llvm.org/viewvc/llvm-project?rev=61713&view=rev
Log:
Handle iAny and fAny types in TreePatternNode::UpdateNodeType.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=61713&r1=61712&r2=61713&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Jan 5 11:52:54 2009
@@ -482,8 +482,9 @@
}
}
}
-
- 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 @@
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 @@
//
// 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;
More information about the llvm-commits
mailing list