Skip to content

Commit

Permalink
Auto merge of #124606 - scottmcm:less-expect, r=<try>
Browse files Browse the repository at this point in the history
Stop `llvm.expect`ing assert terminators

r? ghost
  • Loading branch information
bors committed May 2, 2024
2 parents fcc06c8 + c04b955 commit b1efbc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
return helper.funclet_br(self, bx, target, mergeable_succ);
}

// Pass the condition through llvm.expect for branch hinting.
let cond = bx.expect(cond, expected);
// Because we're branching to a panic block (either a `#[cold]` one
// or an inlined abort), there's no need to `expect` it.

// Create the failure block and the conditional branch to it.
let lltarget = helper.llbb_with_cleanup(self, target);
Expand Down

0 comments on commit b1efbc0

Please sign in to comment.