We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 162ecaf commit c8de4b0Copy full SHA for c8de4b0
lib/Optimizer/IROptimizer/IROptimizer.cpp
@@ -1538,7 +1538,11 @@ static void performDebugInstrumentation(IRFunction &M) {
1538
name += ".";
1539
name += I->getKindName();
1540
auto *dumpInstr = new DebugPrintInst(name, Op.first);
1541
- M.insertInstruction(&*next, dumpInstr);
+ if (next == e) {
1542
+ M.insertInstruction(dumpInstr);
1543
+ } else {
1544
+ M.insertInstruction(&*next, dumpInstr);
1545
+ }
1546
}
1547
1548
it = next;
0 commit comments