Skip to content

Commit 837075c

Browse files
committed
IRGen: Use ConditionalDominanceScope in IRGen-generated control flow for pack iteration
1 parent 25280cb commit 837075c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/IRGen/GenPack.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ static void emitPackExpansionPack(
381381
IGF.Builder.CreateCondBr(cond, loop, rest);
382382

383383
IGF.Builder.emitBlock(loop);
384+
ConditionalDominanceScope condition(IGF);
384385

385386
auto *element = elementForIndex(phi);
386387

@@ -824,6 +825,8 @@ llvm::Value *irgen::emitTypeMetadataPackElementRef(
824825
// (1) Emit check_i {{
825826
IGF.Builder.emitBlock(checkBounds);
826827

828+
ConditionalDominanceScope dominanceScope(IGF);
829+
827830
// The upper bound for the current pack expansion. Exclusive.
828831
llvm::Value *upperBound = nullptr;
829832
llvm::Value *condition = nullptr;

0 commit comments

Comments
 (0)