Relax an assertion a bit. We allow replacing things like
authorChris Lattner <sabre@nondot.org>
Sun, 21 Feb 2010 19:35:07 +0000 (19:35 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 21 Feb 2010 19:35:07 +0000 (19:35 +0000)
<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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96750 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/DAGISelHeader.h

index 42583ec18b102ba462c401dc73d8d0ff46d9662e..4ed662f06e01eb23751fdfec30bf56e4070fd499 100644 (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);
       }