Skip to content

Commit 7b43cc5

Browse files
committed
Temp assert to find tests with non-WillReturn intrinsics
1 parent fa37027 commit 7b43cc5

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
@@ -5227,6 +5227,9 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
52275227
bool HasChain = !F->doesNotAccessMemory();
52285228
bool OnlyLoad = HasChain && F->onlyReadsMemory() && F->willReturn();
52295229

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

0 commit comments

Comments
 (0)