Skip to content

Commit 0cfeb18

Browse files
committed
Verify CHAIN_BARRIER nodes
1 parent b8c9a28 commit 0cfeb18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,14 @@ static void VerifySDNode(SDNode *N, const TargetLowering *TLI) {
11821182
}
11831183
break;
11841184
}
1185+
case ISD::CHAIN_BARRIER: {
1186+
assert(N->getNumValues() == 1 && "Expected single result!");
1187+
assert(N->getNumOperands() == 1 && "Expected single operand!");
1188+
assert(N->getValueType(0) == MVT::Other &&
1189+
N->getOperand(0).getValueType() == MVT::Other &&
1190+
"Expected result and operand to be chains!");
1191+
break;
1192+
}
11851193
}
11861194
}
11871195
#endif // NDEBUG

0 commit comments

Comments
 (0)