ir_passes: Add barrier at end of block too

This commit is contained in:
IndecisiveTurtle 2025-02-23 18:13:05 +02:00
parent bc85357235
commit 0675f5a554

View file

@ -43,6 +43,10 @@ static void EmitBarrierInBlock(IR::Block* block) {
action = BarrierAction::BarrierOnRead;
}
}
if (action != BarrierAction::None) {
IR::IREmitter ir{*block, --block->end()};
ir.Barrier();
}
}
// Inserts a barrier after divergent conditional blocks to avoid undefined