Skip to content

Commit 1a27566

Browse files
committed
Likely unlikely fix
1 parent 995ccb6 commit 1a27566

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/intrinsics/mod.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
453453
fx.bcx.ins().trap(TrapCode::user(2).unwrap());
454454
return Ok(());
455455
}
456-
sym::likely | sym::unlikely => {
457-
intrinsic_args!(fx, args => (a); intrinsic);
458-
459-
ret.write_cvalue(fx, a);
460-
}
461456
sym::breakpoint => {
462457
intrinsic_args!(fx, args => (); intrinsic);
463458

@@ -1267,6 +1262,10 @@ fn codegen_regular_intrinsic_call<'tcx>(
12671262
);
12681263
}
12691264

1265+
sym::cold_path => {
1266+
// This is a no-op. The intrinsic is just a hint to the optimizer.
1267+
}
1268+
12701269
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained
12711270
// by converting the `InstanceKind::Intrinsic` to an `InstanceKind::Item`.
12721271
_ => {

0 commit comments

Comments
 (0)