Don't codegen expect
in opt-level=0
This commit is contained in:
parent
842d6fc32e
commit
5b96ae7106
4 changed files with 14 additions and 14 deletions
|
@ -382,7 +382,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
scalar: abi::Scalar,
|
||||
backend_ty: Bx::Type,
|
||||
) {
|
||||
if matches!(self.cx.sess().opts.optimize, OptLevel::No | OptLevel::Less)
|
||||
if matches!(self.cx.sess().opts.optimize, OptLevel::No)
|
||||
// For now, the critical niches are all over `Int`eger values.
|
||||
// Should floating-point values or pointers ever get more complex
|
||||
// niches, then this code will probably want to handle them too.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use rustc_middle::mir::{self, NonDivergingIntrinsic};
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_session::config::OptLevel;
|
||||
use tracing::instrument;
|
||||
|
||||
use super::{FunctionCx, LocalRef};
|
||||
|
@ -68,10 +67,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
self.codegen_coverage(bx, kind, statement.source_info.scope);
|
||||
}
|
||||
mir::StatementKind::Intrinsic(box NonDivergingIntrinsic::Assume(ref op)) => {
|
||||
if !matches!(bx.tcx().sess.opts.optimize, OptLevel::No | OptLevel::Less) {
|
||||
let op_val = self.codegen_operand(bx, op);
|
||||
bx.assume(op_val.immediate());
|
||||
}
|
||||
let op_val = self.codegen_operand(bx, op);
|
||||
bx.assume(op_val.immediate());
|
||||
}
|
||||
mir::StatementKind::Intrinsic(box NonDivergingIntrinsic::CopyNonOverlapping(
|
||||
mir::CopyNonOverlapping { ref count, ref src, ref dst },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue