Skip to content

Commit 69ce752

Browse files
committed
Temp assert to find tests with non-WillReturn intrinsics
1 parent 53470cc commit 69ce752

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5231,6 +5231,9 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
52315231
bool HasChain = !F->doesNotAccessMemory();
52325232
bool OnlyLoad = HasChain && F->onlyReadsMemory() && F->willReturn();
52335233

5234+
bool PrevOnlyLoad = HasChain && F->onlyReadsMemory();
5235+
assert((!PrevOnlyLoad || F->willReturn()) && "Intrinsic treated as `OnlyLoad` despite no WillReturn");
5236+
52345237
// Build the operand list.
52355238
SmallVector<SDValue, 8> Ops;
52365239
if (HasChain) { // If this intrinsic has side-effects, chainify it.

0 commit comments

Comments
 (0)