Relax an assertion a bit. We allow replacing things like

<4 x i32> with <4 x float> values if they end up the same
register class.  This gets us up to 231 passes on the ppc
tests (only 7 fails).

llvm-svn: 96750
This commit is contained in:
Chris Lattner 2010-02-21 19:35:07 +00:00
parent c43c88ebce
commit 9492c6ee57
1 changed files with 3 additions and 1 deletions

View File

@ -716,7 +716,9 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
unsigned ResSlot = MatcherTable[MatcherIndex++];
assert(ResSlot < RecordedNodes.size() && "Invalid CheckSame");
SDValue Res = RecordedNodes[ResSlot];
assert(NodeToMatch->getValueType(i) == Res.getValueType() &&
assert((NodeToMatch->getValueType(i) == Res.getValueType() ||
NodeToMatch->getValueType(i).getSizeInBits() ==
Res.getValueType().getSizeInBits()) &&
"invalid replacement");
ReplaceUses(SDValue(NodeToMatch, i), Res);
}