1
Fork 0

Likely unlikely fix

This commit is contained in:
Jiri Bobek 2024-07-26 15:51:46 +02:00
parent f2a35426b6
commit 777003ae9f
22 changed files with 256 additions and 73 deletions

View file

@ -453,11 +453,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
fx.bcx.ins().trap(TrapCode::user(2).unwrap());
return Ok(());
}
sym::likely | sym::unlikely => {
intrinsic_args!(fx, args => (a); intrinsic);
ret.write_cvalue(fx, a);
}
sym::breakpoint => {
intrinsic_args!(fx, args => (); intrinsic);
@ -1267,6 +1262,10 @@ fn codegen_regular_intrinsic_call<'tcx>(
);
}
sym::cold_path => {
// This is a no-op. The intrinsic is just a hint to the optimizer.
}
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained
// by converting the `InstanceKind::Intrinsic` to an `InstanceKind::Item`.
_ => {