diff options
-rw-r--r-- | include/llvm/CodeGen/DAGISelHeader.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index 4babed87ae..d208acdc74 100644 --- a/include/llvm/CodeGen/DAGISelHeader.h +++ b/include/llvm/CodeGen/DAGISelHeader.h @@ -494,9 +494,10 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++]; - if (N.getOperand(ChildNo).getValueType() != VT) { + EVT ChildVT = N.getOperand(ChildNo).getValueType(); + if (ChildVT != VT) { // Handle the case when VT is iPTR. - if (VT != MVT::iPTR || N.getValueType() != TLI.getPointerTy()) + if (VT != MVT::iPTR || ChildVT != TLI.getPointerTy()) break; } continue; |