diff options
| author | Jiri Bobek <jiri.bobek@gmail.com> | 2024-07-26 15:51:46 +0200 | 
|---|---|---|
| committer | Jiri Bobek <jiri.bobek@gmail.com> | 2024-11-17 21:49:10 +0100 | 
| commit | 777003ae9fd4d81ada91f67f388d4f12c9ca220a (patch) | |
| tree | 2ce8e9305e60c0ddf132100cc683eac538ffbc70 /compiler/rustc_codegen_cranelift/src | |
| parent | f2a35426b6586178c44b27cedae182502092e898 (diff) | |
| download | rust-777003ae9fd4d81ada91f67f388d4f12c9ca220a.tar.gz rust-777003ae9fd4d81ada91f67f388d4f12c9ca220a.zip  | |
Likely unlikely fix
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 1e2e41b3122..b92885cc1a7 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -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`. _ => {  | 
