Skip to content

Commit

Permalink
simplify_branches: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 24, 2024
1 parent 548e14b commit 42526e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_mir_transform/src/simplify_branches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl<'tcx> MirPass<'tcx> for SimplifyConstCondition {
let param_env = tcx.param_env_reveal_all_normalized(body.source.def_id());
'blocks: for block in body.basic_blocks_mut() {
for stmt in block.statements.iter_mut() {
// Simplify `assume` of a known value: either a NOP or unreachable.
if let StatementKind::Intrinsic(box ref intrinsic) = stmt.kind
&& let NonDivergingIntrinsic::Assume(discr) = intrinsic
&& let Operand::Constant(ref c) = discr
Expand Down

0 comments on commit 42526e1

Please sign in to comment.