Skip to content

Commit

Permalink
Unrolled build for rust-lang#122996
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122996 - RalfJung:simplify_branches, r=cjgillot

simplify_branches: add comment

I am not quite sure why this simplification is done here and not in InstSimplify but 🤷

r? `@cjgillot`
  • Loading branch information
rust-timer committed Mar 26, 2024
2 parents 536606b + 42526e1 commit fd839b0
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 fd839b0

Please sign in to comment.