1
Fork 0

Stop llvm.expecting assert terminators

This commit is contained in:
Scott McMurray 2024-05-01 23:14:13 -07:00
parent fcc06c894b
commit c04b95512d

View file

@ -649,8 +649,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
return helper.funclet_br(self, bx, target, mergeable_succ); return helper.funclet_br(self, bx, target, mergeable_succ);
} }
// Pass the condition through llvm.expect for branch hinting. // Because we're branching to a panic block (either a `#[cold]` one
let cond = bx.expect(cond, expected); // or an inlined abort), there's no need to `expect` it.
// Create the failure block and the conditional branch to it. // Create the failure block and the conditional branch to it.
let lltarget = helper.llbb_with_cleanup(self, target); let lltarget = helper.llbb_with_cleanup(self, target);