Skip to content

Commit a4bb991

Browse files
committed
add getTgtMemIntrinsic assertion
1 parent fb5c49f commit a4bb991

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3512,6 +3512,11 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
35123512
/// - they do not need custom argument handling (no
35133513
/// TLI.CollectTargetIntrinsicOperands())
35143514
void SelectionDAGBuilder::visitCallBrIntrinsic(const CallBrInst &I) {
3515+
TargetLowering::IntrinsicInfo Info;
3516+
assert(!DAG.getTargetLoweringInfo().getTgtMemIntrinsic(
3517+
Info, I, DAG.getMachineFunction(), I.getIntrinsicID()) &&
3518+
"Intrinsic touches memory");
3519+
35153520
auto [HasChain, OnlyLoad] = getTargetIntrinsicCallProperties(I);
35163521

35173522
SmallVector<SDValue, 8> Ops =

0 commit comments

Comments
 (0)