diff options
-rw-r--r-- | include/llvm/CodeGen/DAGISelHeader.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index 42583ec18b..4ed662f06e 100644 --- a/include/llvm/CodeGen/DAGISelHeader.h +++ b/include/llvm/CodeGen/DAGISelHeader.h @@ -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); } |